diff --git a/common/resampler.cpp b/common/resampler.cpp index 5568cf65..1cfba430 100644 --- a/common/resampler.cpp +++ b/common/resampler.cpp @@ -54,6 +54,10 @@ Resampler::Resampler(const SampleFormat& in_format, const SampleFormat& out_form } #else LOG(WARNING, LOG_TAG) << "Soxr not available, resampling not supported\n"; + if ((out_format_.rate() != in_format_.rate()) || (out_format_.bits() != in_format_.bits())) + { + throw SnapException("Resampling requested, but not supported"); + } #endif // resampled_chunk_ = std::make_unique(out_format_, 0); }