Make this exception optional on NO_EXCEPTIONS, as the others are (required for Android)

This commit is contained in:
Chris Cannam
2022-11-16 10:12:41 +00:00
parent 8d4d783155
commit 3960bca0ab

View File

@@ -420,7 +420,13 @@ BQResampler::phase_data_for(vector<BQResampler::phase_rec> &target_phase_data,
}
if (m_dynamism == RatioMostlyFixed) {
if (!filter) throw std::logic_error("filter required at phase_data_for in RatioMostlyFixed mode");
if (!filter) {
#ifndef NO_EXCEPTIONS
throw std::logic_error("filter required at phase_data_for in RatioMostlyFixed mode");
#else
abort();
#endif
}
target_phase_sorted_filter.clear();
target_phase_sorted_filter.reserve(filter_length);
for (int p = initial_phase; ; ) {