mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-09 22:31:55 +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
|
#else
|
||||||
LOG(WARNING, LOG_TAG) << "Soxr not available, resampling not supported\n";
|
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
|
#endif
|
||||||
// resampled_chunk_ = std::make_unique<msg::PcmChunk>(out_format_, 0);
|
// resampled_chunk_ = std::make_unique<msg::PcmChunk>(out_format_, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue