1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

WFM modulator: fixed tone frequency and apply channel settings output sample rate handling

This commit is contained in:
f4exb 2018-01-02 12:32:22 +01:00
parent 23e5ef76d4
commit 018c8ade40

View File

@ -424,11 +424,11 @@ void WFMMod::applyChannelSettings(int basebandSampleRate, int outputSampleRate,
m_interpolatorConsumed = false;
m_interpolatorDistance = (Real) m_settings.m_audioSampleRate / (Real) outputSampleRate;
m_interpolator.create(48, m_settings.m_audioSampleRate, m_settings.m_rfBandwidth / 2.2, 3.0);
Real lowCut = -(m_settings.m_rfBandwidth / 2.0) / m_outputSampleRate;
Real hiCut = (m_settings.m_rfBandwidth / 2.0) / m_outputSampleRate;
Real lowCut = -(m_settings.m_rfBandwidth / 2.0) / outputSampleRate;
Real hiCut = (m_settings.m_rfBandwidth / 2.0) / outputSampleRate;
m_rfFilter->create_filter(lowCut, hiCut);
m_toneNcoRF.setFreq(m_settings.m_toneFrequency, m_outputSampleRate);
m_cwKeyer.setSampleRate(m_outputSampleRate);
m_toneNcoRF.setFreq(m_settings.m_toneFrequency, outputSampleRate);
m_cwKeyer.setSampleRate(outputSampleRate);
m_cwKeyer.reset();
m_settingsMutex.unlock();
}
@ -471,14 +471,6 @@ void WFMMod::applySettings(const WFMModSettings& settings, bool force)
m_settingsMutex.unlock();
}
if ((settings.m_toneFrequency != m_settings.m_toneFrequency) ||
(settings.m_audioSampleRate != m_settings.m_audioSampleRate) || force)
{
m_settingsMutex.lock();
m_toneNco.setFreq(settings.m_toneFrequency, settings.m_audioSampleRate);
m_settingsMutex.unlock();
}
if ((settings.m_toneFrequency != m_settings.m_toneFrequency) || force)
{
m_settingsMutex.lock();