mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55: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)
|
Interpolator m_interpolator; //!< Interpolator between sample rate sent from DSP engine and requested RF bandwidth (rational)
|
||||||
Real m_interpolatorDistance;
|
Real m_interpolatorDistance;
|
||||||
Real m_interpolatorDistanceRemain;
|
Real m_interpolatorDistanceRemain;
|
||||||
Lowpass<Real> m_lowpass;
|
|
||||||
fftfilt* m_rfFilter;
|
fftfilt* m_rfFilter;
|
||||||
|
|
||||||
Real m_squelchLevel;
|
Real m_squelchLevel;
|
||||||
|
@ -136,7 +136,7 @@ void WFMMod::pull(Sample& sample)
|
|||||||
pullAF(ri);
|
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.real(cos(m_modPhasor) * 29204.0f); // -1 dB
|
||||||
ci.imag(sin(m_modPhasor) * 29204.0f);
|
ci.imag(sin(m_modPhasor) * 29204.0f);
|
||||||
|
|
||||||
@ -389,10 +389,10 @@ void WFMMod::apply()
|
|||||||
(m_config.m_afBandwidth != m_running.m_afBandwidth))
|
(m_config.m_afBandwidth != m_running.m_afBandwidth))
|
||||||
{
|
{
|
||||||
m_settingsMutex.lock();
|
m_settingsMutex.lock();
|
||||||
m_interpolatorDistanceRemain = 0;
|
m_interpolatorDistanceRemain = 0;
|
||||||
m_interpolatorConsumed = false;
|
m_interpolatorConsumed = false;
|
||||||
m_interpolatorDistance = (Real) m_config.m_audioSampleRate / (Real) m_config.m_outputSampleRate;
|
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();
|
m_settingsMutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user