mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 17:45:48 -05:00
WFM mod: Fixed interpolator sample rates calculation. Fixed FM deviation
This commit is contained in:
parent
e99a5c5f6d
commit
5e324e816a
@ -114,7 +114,6 @@ private:
|
||||
Interpolator m_interpolator; //!< Interpolator between sample rate sent from DSP engine and requested RF bandwidth (rational)
|
||||
Real m_interpolatorDistance;
|
||||
Real m_interpolatorDistanceRemain;
|
||||
Lowpass<Real> m_lowpass;
|
||||
fftfilt* m_rfFilter;
|
||||
|
||||
Real m_squelchLevel;
|
||||
|
@ -136,7 +136,7 @@ void WFMMod::pull(Sample& sample)
|
||||
pullAF(ri);
|
||||
}
|
||||
|
||||
m_modPhasor += (m_running.m_fmDeviation / (float) m_running.m_outputSampleRate) * ri.real() * M_PI;
|
||||
m_modPhasor += (m_running.m_fmDeviation / (float) m_running.m_outputSampleRate) * ri.real() * M_PI * 2.0f;
|
||||
ci.real(cos(m_modPhasor) * 29204.0f); // -1 dB
|
||||
ci.imag(sin(m_modPhasor) * 29204.0f);
|
||||
|
||||
@ -392,7 +392,7 @@ void WFMMod::apply()
|
||||
m_interpolatorDistanceRemain = 0;
|
||||
m_interpolatorConsumed = false;
|
||||
m_interpolatorDistance = (Real) m_config.m_audioSampleRate / (Real) m_config.m_outputSampleRate;
|
||||
m_interpolator.create(48, m_config.m_audioSampleRate, m_config.m_afBandwidth, 3.0);
|
||||
m_interpolator.create(48, m_config.m_audioSampleRate, m_config.m_rfBandwidth / 2.2, 3.0);
|
||||
m_settingsMutex.unlock();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user