1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

NFM mod and demod: fixed lowpass filter initialization at construction time (segfault correction with CTCSS)

This commit is contained in:
f4exb 2018-03-31 15:06:35 +02:00
parent 52f6910eed
commit f838258937
2 changed files with 3 additions and 0 deletions

View File

@ -82,6 +82,8 @@ NFMDemod::NFMDemod(DeviceSourceAPI *devieAPI) :
DSPEngine::instance()->getAudioDeviceManager()->addAudioSink(&m_audioFifo, getInputMessageQueue()); DSPEngine::instance()->getAudioDeviceManager()->addAudioSink(&m_audioFifo, getInputMessageQueue());
m_audioSampleRate = DSPEngine::instance()->getAudioDeviceManager()->getOutputSampleRate(); m_audioSampleRate = DSPEngine::instance()->getAudioDeviceManager()->getOutputSampleRate();
m_lowpass.create(301, m_audioSampleRate, 250.0);
applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true); applyChannelSettings(m_inputSampleRate, m_inputFrequencyOffset, true);
applySettings(m_settings, true); applySettings(m_settings, true);

View File

@ -74,6 +74,7 @@ NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) :
DSPEngine::instance()->getAudioDeviceManager()->addAudioSource(&m_audioFifo, getInputMessageQueue()); DSPEngine::instance()->getAudioDeviceManager()->addAudioSource(&m_audioFifo, getInputMessageQueue());
m_audioSampleRate = DSPEngine::instance()->getAudioDeviceManager()->getInputSampleRate(); m_audioSampleRate = DSPEngine::instance()->getAudioDeviceManager()->getInputSampleRate();
m_lowpass.create(301, m_audioSampleRate, 250.0);
m_toneNco.setFreq(1000.0, m_audioSampleRate); m_toneNco.setFreq(1000.0, m_audioSampleRate);
m_ctcssNco.setFreq(88.5, m_audioSampleRate); m_ctcssNco.setFreq(88.5, m_audioSampleRate);