From 3960bca0abafd851c2b460ff1d3c09717e6c8003 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Wed, 16 Nov 2022 10:12:41 +0000 Subject: [PATCH] Make this exception optional on NO_EXCEPTIONS, as the others are (required for Android) --- src/common/BQResampler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/BQResampler.cpp b/src/common/BQResampler.cpp index af7bb1e..ea9033c 100644 --- a/src/common/BQResampler.cpp +++ b/src/common/BQResampler.cpp @@ -420,7 +420,13 @@ BQResampler::phase_data_for(vector &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; ; ) {