diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 05e73cb43..6dadb7a8e 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -17,12 +17,16 @@ #include #include #include + #include #include #include + #include #include "dsp/dspengine.h" #include "dsp/pidcontroller.h" +#include "device/devicesinkapi.h" + #include "nfmmod.h" MESSAGE_CLASS_DEFINITION(NFMMod::MsgConfigureNFMMod, Message) @@ -36,7 +40,8 @@ MESSAGE_CLASS_DEFINITION(NFMMod::MsgReportFileSourceStreamTiming, Message) const int NFMMod::m_levelNbSamples = 480; // every 10ms -NFMMod::NFMMod() : +NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) : + m_deviceAPI(deviceAPI), m_modPhasor(0.0f), m_movingAverage(40, 0), m_volumeAGC(40, 0), diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index bd60c3b4b..058429f80 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -36,6 +36,10 @@ #include "nfmmodsettings.h" +class DeviceSinkAPI; +class ThreadedBasebandSampleSource; +class UpChannelizer; + class NFMMod : public BasebandSampleSource { Q_OBJECT @@ -223,7 +227,7 @@ public: //================================================================= - NFMMod(); + NFMMod(DeviceSinkAPI *deviceAPI); ~NFMMod(); virtual void pull(Sample& sample); @@ -252,6 +256,9 @@ private: RSRunning }; + DeviceSinkAPI* m_deviceAPI; + ThreadedBasebandSampleSource* m_threadedChannelizer; + UpChannelizer* m_channelizer; NFMModSettings m_settings; NCO m_carrierNco; diff --git a/plugins/channeltx/modnfm/nfmmodgui.cpp b/plugins/channeltx/modnfm/nfmmodgui.cpp index 469b1ff7a..7946692ce 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.cpp +++ b/plugins/channeltx/modnfm/nfmmodgui.cpp @@ -319,7 +319,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked())); - m_nfmMod = new NFMMod(); + m_nfmMod = new NFMMod(m_deviceAPI); m_nfmMod->setMessageQueueToGUI(getInputMessageQueue()); m_channelizer = new UpChannelizer(m_nfmMod); m_threadedChannelizer = new ThreadedBasebandSampleSource(m_channelizer, this);