1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 05:11:49 -05:00

Down channelizer: prevent negative sample rate

This commit is contained in:
f4exb 2020-08-02 00:58:29 +02:00
parent c41cf68d60
commit fa554d8244

View File

@ -89,6 +89,12 @@ void DownChannelizer::feed(const SampleVector::const_iterator& begin, const Samp
void DownChannelizer::setChannelization(int requestedSampleRate, qint64 requestedCenterFrequency) void DownChannelizer::setChannelization(int requestedSampleRate, qint64 requestedCenterFrequency)
{ {
if (requestedSampleRate < 0)
{
qWarning("DownChannelizer::setChannelization: wrong sample rate requested: %d", requestedSampleRate);
return;
}
m_requestedOutputSampleRate = requestedSampleRate; m_requestedOutputSampleRate = requestedSampleRate;
m_requestedCenterFrequency = requestedCenterFrequency; m_requestedCenterFrequency = requestedCenterFrequency;
applyChannelization(); applyChannelization();