mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-03 03:11:43 +02:00
Throw if resampling is required but not supported
This commit is contained in:
parent
a88e011fd6
commit
6b2284f039
1 changed files with 4 additions and 0 deletions
|
@ -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<msg::PcmChunk>(out_format_, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue