mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-05 07:24:44 -04:00
Multi device support: pass plugin API to devices input handlers to give access to DSP device engine methods
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <QDebug>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#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<Pro>::sampleRate, m_settings.m_centerFrequency);
|
||||
DSPEngine::instance()->getInputMessageQueue()->push(notif);
|
||||
m_pluginAPI->getDeviceInputMessageQueue()->push(notif);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user