mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-13 15:08:40 -04:00
AM and NFM demods: skip feed completely if not in running state
This commit is contained in:
parent
3f08855e9e
commit
9a3832a14f
plugins/channelrx
@ -83,6 +83,10 @@ void AMDemod::feed(const SampleVector::const_iterator& begin, const SampleVector
|
||||
{
|
||||
Complex ci;
|
||||
|
||||
if (!m_running) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_settingsMutex.lock();
|
||||
|
||||
for (SampleVector::const_iterator it = begin; it != end; ++it)
|
||||
@ -111,7 +115,7 @@ void AMDemod::feed(const SampleVector::const_iterator& begin, const SampleVector
|
||||
}
|
||||
}
|
||||
|
||||
if (m_running && (m_audioBufferFill > 0))
|
||||
if (m_audioBufferFill > 0)
|
||||
{
|
||||
uint res = m_audioFifo.write((const quint8*)&m_audioBuffer[0], m_audioBufferFill, 10);
|
||||
|
||||
|
@ -143,6 +143,10 @@ void NFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
||||
{
|
||||
Complex ci;
|
||||
|
||||
if (!m_running) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_settingsMutex.lock();
|
||||
|
||||
for (SampleVector::const_iterator it = begin; it != end; ++it)
|
||||
@ -308,7 +312,7 @@ void NFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
||||
}
|
||||
}
|
||||
|
||||
if (m_running && (m_audioBufferFill > 0))
|
||||
if (m_audioBufferFill > 0)
|
||||
{
|
||||
uint res = m_audioFifo.write((const quint8*)&m_audioBuffer[0], m_audioBufferFill, 10);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user