mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-21 23:55:13 -05:00
NFM modulator: applied suggested fixes. Fixes #1899
This commit is contained in:
parent
7a71968cbf
commit
003a04ed70
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user