diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 7a9b4c61f..1a7b8c520 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -154,7 +154,7 @@ void NFMMod::pull(Sample& sample) void NFMMod::pullAudio(int nbSamples) { - unsigned int nbSamplesAudio = nbSamples * m_interpolatorDistance; + unsigned int nbSamplesAudio = nbSamples * ((Real) m_config.m_audioSampleRate / (Real) m_config.m_basebandSampleRate); if (nbSamplesAudio > m_audioBuffer.size()) { @@ -291,13 +291,15 @@ bool NFMMod::handleMessage(const Message& cmd) { UpChannelizer::MsgChannelizerNotification& notif = (UpChannelizer::MsgChannelizerNotification&) cmd; - m_config.m_outputSampleRate = notif.getSampleRate(); + m_config.m_basebandSampleRate = notif.getBasebandSampleRate(); + m_config.m_outputSampleRate = notif.getSampleRate(); m_config.m_inputFrequencyOffset = notif.getFrequencyOffset(); apply(); qDebug() << "NFMMod::handleMessage: MsgChannelizerNotification:" - << " m_outputSampleRate: " << m_config.m_outputSampleRate + << " m_basebandSampleRate: " << m_config.m_basebandSampleRate + << " m_outputSampleRate: " << m_config.m_outputSampleRate << " m_inputFrequencyOffset: " << m_config.m_inputFrequencyOffset; return true; diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index 595466b79..f7e848b72 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -293,6 +293,7 @@ private: }; struct Config { + int m_basebandSampleRate; int m_outputSampleRate; qint64 m_inputFrequencyOffset; Real m_rfBandwidth; @@ -307,6 +308,7 @@ private: float m_ctcssFrequency; Config() : + m_basebandSampleRate(0), m_outputSampleRate(-1), m_inputFrequencyOffset(0), m_rfBandwidth(-1), diff --git a/plugins/channeltx/modnfm/nfmmodplugin.cpp b/plugins/channeltx/modnfm/nfmmodplugin.cpp index 7e9ae6ce3..68b9cb7c4 100644 --- a/plugins/channeltx/modnfm/nfmmodplugin.cpp +++ b/plugins/channeltx/modnfm/nfmmodplugin.cpp @@ -23,7 +23,7 @@ const PluginDescriptor NFMModPlugin::m_pluginDescriptor = { QString("NFM Modulator"), - QString("3.5.0"), + QString("3.5.4"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true,