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:
parent
c41cf68d60
commit
fa554d8244
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user