From 7707858d579b32e77307baec1ce7fb8b975e61a8 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 12 May 2016 23:35:30 +0200 Subject: [PATCH] Multi device support: pass plugin API to devices input handlers to give access to DSP device engine methods --- plugins/samplesource/airspy/airspygui.cpp | 2 +- plugins/samplesource/airspy/airspyinput.cpp | 6 ++++-- plugins/samplesource/airspy/airspyinput.h | 4 +++- plugins/samplesource/bladerf/bladerfgui.cpp | 2 +- plugins/samplesource/bladerf/bladerfinput.cpp | 6 ++++-- plugins/samplesource/bladerf/bladerfinput.h | 4 +++- plugins/samplesource/fcdpro/fcdprogui.cpp | 2 +- plugins/samplesource/fcdpro/fcdproinput.cpp | 7 +++++-- plugins/samplesource/fcdpro/fcdproinput.h | 4 +++- plugins/samplesource/fcdproplus/fcdproplusgui.cpp | 2 +- plugins/samplesource/fcdproplus/fcdproplusinput.cpp | 10 +++++++--- plugins/samplesource/fcdproplus/fcdproplusinput.h | 4 +++- plugins/samplesource/hackrf/hackrfgui.cpp | 2 +- plugins/samplesource/hackrf/hackrfinput.cpp | 7 ++++--- plugins/samplesource/hackrf/hackrfinput.h | 4 +++- plugins/samplesource/rtlsdr/rtlsdrgui.cpp | 2 +- plugins/samplesource/rtlsdr/rtlsdrinput.cpp | 12 +++++++----- plugins/samplesource/rtlsdr/rtlsdrinput.h | 4 +++- plugins/samplesource/sdrdaemon/sdrdaemongui.cpp | 2 +- plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp | 4 +++- plugins/samplesource/sdrdaemon/sdrdaemoninput.h | 4 +++- sdrbase/dsp/dspengine.cpp | 5 ----- sdrbase/dsp/dspengine.h | 1 - sdrbase/mainwindow.cpp | 6 ------ sdrbase/mainwindow.h | 1 - 25 files changed, 62 insertions(+), 45 deletions(-) diff --git a/plugins/samplesource/airspy/airspygui.cpp b/plugins/samplesource/airspy/airspygui.cpp index 60b54b2fc..ad55b1345 100644 --- a/plugins/samplesource/airspy/airspygui.cpp +++ b/plugins/samplesource/airspy/airspygui.cpp @@ -46,7 +46,7 @@ AirspyGui::AirspyGui(PluginAPI* pluginAPI, QWidget* parent) : displaySettings(); - m_sampleSource = new AirspyInput(); + m_sampleSource = new AirspyInput(m_pluginAPI); m_rates = ((AirspyInput*) m_sampleSource)->getSampleRates(); displaySampleRates(); connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); diff --git a/plugins/samplesource/airspy/airspyinput.cpp b/plugins/samplesource/airspy/airspyinput.cpp index d0ad423bf..9811a2c63 100644 --- a/plugins/samplesource/airspy/airspyinput.cpp +++ b/plugins/samplesource/airspy/airspyinput.cpp @@ -20,6 +20,7 @@ #include "airspygui.h" #include "airspyinput.h" +#include "plugin/pluginapi.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" #include "airspysettings.h" @@ -28,7 +29,8 @@ MESSAGE_CLASS_DEFINITION(AirspyInput::MsgConfigureAirspy, Message) MESSAGE_CLASS_DEFINITION(AirspyInput::MsgReportAirspy, Message) -AirspyInput::AirspyInput() : +AirspyInput::AirspyInput(PluginAPI *pluginAPI) : + m_pluginAPI(pluginAPI), m_settings(), m_dev(0), m_airspyThread(0), @@ -449,7 +451,7 @@ bool AirspyInput::applySettings(const AirspySettings& settings, bool force) { int sampleRate = devSampleRate/(1<getInputMessageQueue()->push(notif); + m_pluginAPI->getDeviceInputMessageQueue()->push(notif); } return true; diff --git a/plugins/samplesource/airspy/airspyinput.h b/plugins/samplesource/airspy/airspyinput.h index 2f2527c1c..237a79de8 100644 --- a/plugins/samplesource/airspy/airspyinput.h +++ b/plugins/samplesource/airspy/airspyinput.h @@ -22,6 +22,7 @@ #include #include +class PluginAPI; class AirspyThread; class AirspyInput : public SampleSource { @@ -66,7 +67,7 @@ public: { } }; - AirspyInput(); + AirspyInput(PluginAPI *pluginAPI); virtual ~AirspyInput(); virtual bool init(const Message& message); @@ -85,6 +86,7 @@ private: struct airspy_device *open_airspy_from_sequence(int sequence); void setCenterFrequency(quint64 freq); + PluginAPI *m_pluginAPI; QMutex m_mutex; AirspySettings m_settings; struct airspy_device* m_dev; diff --git a/plugins/samplesource/bladerf/bladerfgui.cpp b/plugins/samplesource/bladerf/bladerfgui.cpp index d97c4b8c0..879cc7c23 100644 --- a/plugins/samplesource/bladerf/bladerfgui.cpp +++ b/plugins/samplesource/bladerf/bladerfgui.cpp @@ -59,7 +59,7 @@ BladerfGui::BladerfGui(PluginAPI* pluginAPI, QWidget* parent) : displaySettings(); - m_sampleSource = new BladerfInput(); + m_sampleSource = new BladerfInput(m_pluginAPI); DSPEngine::instance()->setSource(m_sampleSource); char recFileNameCStr[30]; diff --git a/plugins/samplesource/bladerf/bladerfinput.cpp b/plugins/samplesource/bladerf/bladerfinput.cpp index 18b252aea..f8c66328a 100644 --- a/plugins/samplesource/bladerf/bladerfinput.cpp +++ b/plugins/samplesource/bladerf/bladerfinput.cpp @@ -18,6 +18,7 @@ #include #include +#include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" @@ -28,7 +29,8 @@ MESSAGE_CLASS_DEFINITION(BladerfInput::MsgConfigureBladerf, Message) MESSAGE_CLASS_DEFINITION(BladerfInput::MsgReportBladerf, Message) -BladerfInput::BladerfInput() : +BladerfInput::BladerfInput(PluginAPI *pluginAPI) : + m_pluginAPI(pluginAPI), m_settings(), m_dev(0), m_bladerfThread(0), @@ -413,7 +415,7 @@ bool BladerfInput::applySettings(const BladeRFSettings& settings, bool force) { int sampleRate = m_settings.m_devSampleRate/(1<getInputMessageQueue()->push(notif); + m_pluginAPI->getDeviceInputMessageQueue()->push(notif); } qDebug() << "BladerfInput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz" diff --git a/plugins/samplesource/bladerf/bladerfinput.h b/plugins/samplesource/bladerf/bladerfinput.h index 60f6eac91..99c47d8af 100644 --- a/plugins/samplesource/bladerf/bladerfinput.h +++ b/plugins/samplesource/bladerf/bladerfinput.h @@ -22,6 +22,7 @@ #include #include +class PluginAPI; class BladerfThread; class BladerfInput : public SampleSource { @@ -63,7 +64,7 @@ public: { } }; - BladerfInput(); + BladerfInput(PluginAPI *pluginAPI); virtual ~BladerfInput(); virtual bool init(const Message& message); @@ -81,6 +82,7 @@ private: bladerf_lna_gain getLnaGain(int lnaGain); struct bladerf *open_bladerf_from_serial(const char *serial); + PluginAPI *m_pluginAPI; QMutex m_mutex; BladeRFSettings m_settings; struct bladerf* m_dev; diff --git a/plugins/samplesource/fcdpro/fcdprogui.cpp b/plugins/samplesource/fcdpro/fcdprogui.cpp index aeecfb44f..c9561f069 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.cpp +++ b/plugins/samplesource/fcdpro/fcdprogui.cpp @@ -140,7 +140,7 @@ FCDProGui::FCDProGui(PluginAPI* pluginAPI, QWidget* parent) : displaySettings(); - m_sampleSource = new FCDProInput(); + m_sampleSource = new FCDProInput(m_pluginAPI); DSPEngine::instance()->setSource(m_sampleSource); char recFileNameCStr[30]; diff --git a/plugins/samplesource/fcdpro/fcdproinput.cpp b/plugins/samplesource/fcdpro/fcdproinput.cpp index 750f54318..0a499f80e 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.cpp +++ b/plugins/samplesource/fcdpro/fcdproinput.cpp @@ -20,6 +20,8 @@ #include #include #include + +#include "plugin/pluginapi.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" #include "fcdproinput.h" @@ -31,7 +33,8 @@ MESSAGE_CLASS_DEFINITION(FCDProInput::MsgConfigureFCD, Message) -FCDProInput::FCDProInput() : +FCDProInput::FCDProInput(PluginAPI *pluginAPI) : + m_pluginAPI(pluginAPI), m_dev(0), m_settings(), m_FCDThread(0), @@ -344,7 +347,7 @@ void FCDProInput::applySettings(const FCDProSettings& settings, bool force) if (signalChange) { DSPSignalNotification *notif = new DSPSignalNotification(fcd_traits::sampleRate, m_settings.m_centerFrequency); - DSPEngine::instance()->getInputMessageQueue()->push(notif); + m_pluginAPI->getDeviceInputMessageQueue()->push(notif); } } diff --git a/plugins/samplesource/fcdpro/fcdproinput.h b/plugins/samplesource/fcdpro/fcdproinput.h index 9c8d7573a..787db25db 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.h +++ b/plugins/samplesource/fcdpro/fcdproinput.h @@ -29,6 +29,7 @@ struct fcd_buffer { std::size_t length; }; +class PluginAPI; class FCDProThread; class FCDProInput : public SampleSource { @@ -53,7 +54,7 @@ public: { } }; - FCDProInput(); + FCDProInput(PluginAPI *pluginAPI); virtual ~FCDProInput(); virtual bool init(const Message& cmd); @@ -89,6 +90,7 @@ private: void applySettings(const FCDProSettings& settings, bool force); void set_lo_ppm(); + PluginAPI *m_pluginAPI; hid_device *m_dev; QMutex m_mutex; FCDProSettings m_settings; diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp index c4dec99bb..c20cabcfb 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp @@ -58,7 +58,7 @@ FCDProPlusGui::FCDProPlusGui(PluginAPI* pluginAPI, QWidget* parent) : displaySettings(); - m_sampleSource = new FCDProPlusInput(); + m_sampleSource = new FCDProPlusInput(m_pluginAPI); DSPEngine::instance()->setSource(m_sampleSource); char recFileNameCStr[30]; diff --git a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp index a8fd7acb2..d213ed4bc 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp @@ -19,6 +19,8 @@ #include #include #include + +#include "plugin/pluginapi.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" #include "fcdproplusinput.h" @@ -30,7 +32,8 @@ MESSAGE_CLASS_DEFINITION(FCDProPlusInput::MsgConfigureFCD, Message) -FCDProPlusInput::FCDProPlusInput() : +FCDProPlusInput::FCDProPlusInput(PluginAPI *pluginAPI) : + m_pluginApi(pluginAPI), m_dev(0), m_settings(), m_FCDThread(0), @@ -177,7 +180,7 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for set_bias_t(settings.m_biasT); } } - + if ((m_settings.m_mixGain != settings.m_mixGain) || force) { m_settings.m_mixGain = settings.m_mixGain; @@ -243,7 +246,8 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for if (signalChange) { DSPSignalNotification *notif = new DSPSignalNotification(fcd_traits::sampleRate, m_settings.m_centerFrequency); - DSPEngine::instance()->getInputMessageQueue()->push(notif); + m_pluginApi->getDeviceInputMessageQueue()->push(notif); + //DSPEngine::instance()->getInputMessageQueue()->push(notif); } } diff --git a/plugins/samplesource/fcdproplus/fcdproplusinput.h b/plugins/samplesource/fcdproplus/fcdproplusinput.h index f4af3db1e..ad86290db 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusinput.h +++ b/plugins/samplesource/fcdproplus/fcdproplusinput.h @@ -28,6 +28,7 @@ struct fcd_buffer { std::size_t length; }; +class PluginAPI; class FCDProPlusThread; class FCDProPlusInput : public SampleSource { @@ -52,7 +53,7 @@ public: { } }; - FCDProPlusInput(); + FCDProPlusInput(PluginAPI *pluginAPI); virtual ~FCDProPlusInput(); virtual bool init(const Message& cmd); @@ -77,6 +78,7 @@ public: private: void applySettings(const FCDProPlusSettings& settings, bool force); + PluginAPI *m_pluginApi; hid_device *m_dev; QMutex m_mutex; FCDProPlusSettings m_settings; diff --git a/plugins/samplesource/hackrf/hackrfgui.cpp b/plugins/samplesource/hackrf/hackrfgui.cpp index 5b489fd54..cd1624db4 100644 --- a/plugins/samplesource/hackrf/hackrfgui.cpp +++ b/plugins/samplesource/hackrf/hackrfgui.cpp @@ -46,7 +46,7 @@ HackRFGui::HackRFGui(PluginAPI* pluginAPI, QWidget* parent) : displaySettings(); - m_sampleSource = new HackRFInput(); + m_sampleSource = new HackRFInput(m_pluginAPI); displaySampleRates(); displayBandwidths(); diff --git a/plugins/samplesource/hackrf/hackrfinput.cpp b/plugins/samplesource/hackrf/hackrfinput.cpp index fefbb1084..7fe2fb7a3 100644 --- a/plugins/samplesource/hackrf/hackrfinput.cpp +++ b/plugins/samplesource/hackrf/hackrfinput.cpp @@ -18,6 +18,7 @@ #include #include +#include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" @@ -29,7 +30,8 @@ MESSAGE_CLASS_DEFINITION(HackRFInput::MsgConfigureHackRF, Message) MESSAGE_CLASS_DEFINITION(HackRFInput::MsgReportHackRF, Message) -HackRFInput::HackRFInput() : +HackRFInput::HackRFInput(PluginAPI *pluginAPI) : + m_pluginAPI(pluginAPI), m_settings(), m_dev(0), m_hackRFThread(0), @@ -396,8 +398,7 @@ bool HackRFInput::applySettings(const HackRFSettings& settings, bool force) { int sampleRate = devSampleRate/(1<getInputMessageQueue()->push(notif); - //getOutputMessageQueue()->push(notif); + m_pluginAPI->getDeviceInputMessageQueue()->push(notif); } return true; diff --git a/plugins/samplesource/hackrf/hackrfinput.h b/plugins/samplesource/hackrf/hackrfinput.h index 5349aec6a..24d2bfc6c 100644 --- a/plugins/samplesource/hackrf/hackrfinput.h +++ b/plugins/samplesource/hackrf/hackrfinput.h @@ -22,6 +22,7 @@ #include "hackrfsettings.h" #include +class PluginAPI; class HackRFThread; class HackRFInput : public SampleSource { @@ -64,7 +65,7 @@ public: { } }; - HackRFInput(); + HackRFInput(PluginAPI *pluginAPI); virtual ~HackRFInput(); virtual bool init(const Message& message); @@ -82,6 +83,7 @@ private: hackrf_device *open_hackrf_from_sequence(int sequence); void setCenterFrequency(quint64 freq); + PluginAPI *m_pluginAPI; QMutex m_mutex; HackRFSettings m_settings; struct hackrf_device* m_dev; diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index fb5bdde7c..9a5750b22 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -51,7 +51,7 @@ RTLSDRGui::RTLSDRGui(PluginAPI* pluginAPI, QWidget* parent) : displaySettings(); - m_sampleSource = new RTLSDRInput(); + m_sampleSource = new RTLSDRInput(m_pluginAPI); connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); DSPEngine::instance()->setSource(m_sampleSource); diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp index a730f1fe3..f162f82e4 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp @@ -21,13 +21,15 @@ #include "rtlsdrinput.h" #include "rtlsdrthread.h" #include "rtlsdrgui.h" +#include "plugin/pluginapi.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgConfigureRTLSDR, Message) MESSAGE_CLASS_DEFINITION(RTLSDRInput::MsgReportRTLSDR, Message) -RTLSDRInput::RTLSDRInput() : +RTLSDRInput::RTLSDRInput(PluginAPI *pluginAPI) : + m_pluginAPI(pluginAPI), m_settings(), m_dev(0), m_rtlSDRThread(0), @@ -230,7 +232,7 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force) if ((m_settings.m_devSampleRate != settings.m_devSampleRate) || force) { forwardChange = true; - + if(m_dev != 0) { if( rtlsdr_set_sample_rate(m_dev, settings.m_devSampleRate) < 0) @@ -264,7 +266,7 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force) if ((m_settings.m_log2Decim != settings.m_log2Decim) || force) { forwardChange = true; - + if(m_dev != 0) { m_settings.m_log2Decim = settings.m_log2Decim; @@ -352,7 +354,7 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force) qDebug("rtlsdr_set_center_freq(%lld) failed", m_settings.m_centerFrequency); } }*/ - + if ((m_settings.m_dcBlock != settings.m_dcBlock) || force) { m_settings.m_dcBlock = settings.m_dcBlock; @@ -369,7 +371,7 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force) { int sampleRate = m_settings.m_devSampleRate/(1<getInputMessageQueue()->push(notif); + m_pluginAPI->getDeviceInputMessageQueue()->push(notif); } return true; diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.h b/plugins/samplesource/rtlsdr/rtlsdrinput.h index 732282e9e..c0f813756 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.h +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.h @@ -23,6 +23,7 @@ #include #include +class PluginAPI; class RTLSDRThread; class RTLSDRInput : public SampleSource { @@ -67,7 +68,7 @@ public: { } }; - RTLSDRInput(); + RTLSDRInput(PluginAPI *pluginAPI); virtual ~RTLSDRInput(); virtual bool init(const Message& message); @@ -83,6 +84,7 @@ public: void set_ds_mode(int on); private: + PluginAPI *m_pluginAPI; QMutex m_mutex; RTLSDRSettings m_settings; rtlsdr_dev_t* m_dev; diff --git a/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp b/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp index c760b14d9..7c96e84f8 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp +++ b/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp @@ -88,7 +88,7 @@ SDRdaemonGui::SDRdaemonGui(PluginAPI* pluginAPI, QWidget* parent) : m_statusTimer.start(500); connect(&(m_pluginAPI->getMainWindow()->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick())); - m_sampleSource = new SDRdaemonInput(m_pluginAPI->getMainWindow()->getMasterTimer()); + m_sampleSource = new SDRdaemonInput(m_pluginAPI->getMainWindow()->getMasterTimer(), m_pluginAPI); connect(m_sampleSource->getOutputMessageQueueToGUI(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); DSPEngine::instance()->setSource(m_sampleSource); diff --git a/plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp b/plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp index a511e1865..6ef78eaef 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp +++ b/plugins/samplesource/sdrdaemon/sdrdaemoninput.cpp @@ -18,6 +18,7 @@ #include #include +#include "plugin/pluginapi.h" #include "util/simpleserializer.h" #include "dsp/dspcommands.h" #include "dsp/dspengine.h" @@ -37,7 +38,8 @@ MESSAGE_CLASS_DEFINITION(SDRdaemonInput::MsgReportSDRdaemonAcquisition, Message) MESSAGE_CLASS_DEFINITION(SDRdaemonInput::MsgReportSDRdaemonStreamData, Message) MESSAGE_CLASS_DEFINITION(SDRdaemonInput::MsgReportSDRdaemonStreamTiming, Message) -SDRdaemonInput::SDRdaemonInput(const QTimer& masterTimer) : +SDRdaemonInput::SDRdaemonInput(const QTimer& masterTimer, PluginAPI *pluginAPI) : + m_pluginAPI(pluginAPI), m_address("127.0.0.1"), m_port(9090), m_SDRdaemonUDPHandler(0), diff --git a/plugins/samplesource/sdrdaemon/sdrdaemoninput.h b/plugins/samplesource/sdrdaemon/sdrdaemoninput.h index 4a8236e70..6aa1b6a72 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemoninput.h +++ b/plugins/samplesource/sdrdaemon/sdrdaemoninput.h @@ -24,6 +24,7 @@ #include #include +class PluginAPI; class SDRdaemonUDPHandler; class SDRdaemonInput : public SampleSource { @@ -273,7 +274,7 @@ public: { } }; - SDRdaemonInput(const QTimer& masterTimer); + SDRdaemonInput(const QTimer& masterTimer, PluginAPI *pluginAPI); virtual ~SDRdaemonInput(); virtual bool init(const Message& message); @@ -289,6 +290,7 @@ public: virtual bool handleMessage(const Message& message); private: + PluginAPI *m_pluginAPI; QMutex m_mutex; QString m_address; quint16 m_port; diff --git a/sdrbase/dsp/dspengine.cpp b/sdrbase/dsp/dspengine.cpp index f1b2b7e5d..5681b2fb0 100644 --- a/sdrbase/dsp/dspengine.cpp +++ b/sdrbase/dsp/dspengine.cpp @@ -49,11 +49,6 @@ MessageQueue* DSPEngine::getInputMessageQueue(uint deviceIndex) return m_deviceEngines[deviceIndex]->getInputMessageQueue(); } -MessageQueue* DSPEngine::getOutputMessageQueue(uint deviceIndex) -{ - return m_deviceEngines[deviceIndex]->getOutputMessageQueue(); -} - void DSPEngine::stopAllAcquisitions() { std::vector::iterator it = m_deviceEngines.begin(); diff --git a/sdrbase/dsp/dspengine.h b/sdrbase/dsp/dspengine.h index 03b887542..fc7004fd6 100644 --- a/sdrbase/dsp/dspengine.h +++ b/sdrbase/dsp/dspengine.h @@ -39,7 +39,6 @@ public: static DSPEngine *instance(); MessageQueue* getInputMessageQueue(uint deviceIndex = 0); - MessageQueue* getOutputMessageQueue(uint deviceIndex = 0); uint getAudioSampleRate() const { return m_audioSampleRate; } diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index f06d1e67e..a007632b3 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -276,11 +276,6 @@ void MainWindow::closeEvent(QCloseEvent*) { } -void MainWindow::updateCenterFreqDisplay() -{ - m_deviceUIs.back()->m_spectrum->setCenterFrequency(m_centerFrequency); -} - void MainWindow::updatePresetControls() { ui->presetTree->resizeColumnToContents(0); @@ -334,7 +329,6 @@ QTreeWidgetItem* MainWindow::addPresetToTree(const Preset* preset) void MainWindow::applySettings() { - updateCenterFreqDisplay(); } void MainWindow::handleMessages() diff --git a/sdrbase/mainwindow.h b/sdrbase/mainwindow.h index bb6b10586..c83fb851c 100644 --- a/sdrbase/mainwindow.h +++ b/sdrbase/mainwindow.h @@ -122,7 +122,6 @@ private: void createStatusBar(); void closeEvent(QCloseEvent*); - void updateCenterFreqDisplay(); void updatePresetControls(); QTreeWidgetItem* addPresetToTree(const Preset* preset); void applySettings();