1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-08 20:33:13 -04:00

NFM: review frequency deviation and NFM demod volume control

This commit is contained in:
f4exb
2020-11-05 23:21:04 +01:00
parent fecbd54a35
commit f1cf57bacd
9 changed files with 44 additions and 31 deletions
+2 -3
View File
@@ -134,11 +134,10 @@ void NFMModSource::modulateSample()
calculateLevel(t);
m_audioBufferFill++;
// 0.625 = 1/1.25 (heuristic)
if (m_settings.m_ctcssOn) {
m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * (0.85f * m_bandpass.filter(t) + 0.15f * 0.625f * m_ctcssNco.next()) * (M_PI / 0.625f);
m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * (0.85f * m_bandpass.filter(t) + 0.15f * 0.625f * m_ctcssNco.next()) * 1.33f;
} else {
m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * m_bandpass.filter(t) * (M_PI / 0.625f);
m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * m_bandpass.filter(t) * 1.33f;
}
// limit phasor range to ]-pi,pi]