Down channelizer: prevent negative sample rate

This commit is contained in:
f4exb 2020-08-02 00:58:29 +02:00
parent c41cf68d60
commit fa554d8244
1 changed files with 6 additions and 0 deletions

View File

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