mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Set minimum FIFO size to avoid buffer overflow
This commit is contained in:
parent
60c4fe1ee6
commit
7fe09b9a20
@ -145,7 +145,8 @@ bool NavtexDemodBaseband::handleMessage(const Message& cmd)
|
||||
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
|
||||
qDebug() << "NavtexDemodBaseband::handleMessage: DSPSignalNotification: basebandSampleRate: " << notif.getSampleRate();
|
||||
setBasebandSampleRate(notif.getSampleRate());
|
||||
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(notif.getSampleRate()));
|
||||
// We can run with very slow sample rate (E.g. 4k), but we don't want FIFO getting too small
|
||||
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(std::max(notif.getSampleRate(), 48000)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -145,7 +145,8 @@ bool RttyDemodBaseband::handleMessage(const Message& cmd)
|
||||
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
|
||||
qDebug() << "RttyDemodBaseband::handleMessage: DSPSignalNotification: basebandSampleRate: " << notif.getSampleRate();
|
||||
setBasebandSampleRate(notif.getSampleRate());
|
||||
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(notif.getSampleRate()));
|
||||
// We can run with very slow sample rate (E.g. 4k), but we don't want FIFO getting too small
|
||||
m_sampleFifo.setSize(SampleSinkFifo::getSizePolicy(std::max(notif.getSampleRate(), 48000)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user