NFM modulator: applied suggested fixes. Fixes #1899

pull/1905/head
f4exb 2023-11-26 11:37:55 +01:00
rodzic 7a71968cbf
commit 003a04ed70
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -168,16 +168,16 @@ void NFMModSource::modulateSample()
calculateLevel(t);
if (m_settings.m_ctcssOn) {
t1 = (0.85f * m_bandpass.filter(t) + 0.15f * 0.625f * m_ctcssNco.next()) * 1.2f;
t1 = 0.85f * m_bandpass.filter(t) + 0.15f * 0.625f * m_ctcssNco.next();
} else if (m_settings.m_dcsOn) {
t1 = (0.9f * m_bandpass.filter(t) + 0.1f * 0.625f * m_dcsMod.next()) * 1.2f;
t1 = 0.9f * m_bandpass.filter(t) + 0.1f * 0.625f * m_dcsMod.next();
} else if (m_settings.m_bpfOn) {
t1 = m_bandpass.filter(t) * 1.2f;
t1 = m_bandpass.filter(t);
} else {
t1 = m_lowpass.filter(t) * 1.2f;
t1 = m_lowpass.filter(t);
}
m_modPhasor += (m_settings.m_fmDeviation / (float) m_audioSampleRate) * t1;
m_modPhasor += (M_PI * m_settings.m_fmDeviation / (float) m_audioSampleRate) * t1;
// limit phasor range to ]-pi,pi]
if (m_modPhasor > M_PI) {