1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 05:41:56 -05:00

Multi device support: suppress reference to DSPEngine in PluginAPI

This commit is contained in:
f4exb 2016-05-11 16:03:03 +02:00
parent c556a16caa
commit e3d39c7d3f
4 changed files with 5 additions and 49 deletions

View File

@ -64,7 +64,6 @@ MainWindow::MainWindow(QWidget* parent) :
m_sampleFileName(std::string("./test.sdriq"))
{
qDebug() << "MainWindow::MainWindow: start";
m_pluginManager = new PluginManager(this, m_dspEngine);
connect(m_dspEngine->getOutputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleDSPMessages()), Qt::QueuedConnection);
m_dspEngine->start();
@ -105,6 +104,7 @@ MainWindow::MainWindow(QWidget* parent) :
qDebug() << "MainWindow::MainWindow: m_pluginManager->loadPlugins ...";
m_pluginManager = new PluginManager(this, m_dspEngine);
m_pluginManager->loadPlugins();
//bool sampleSourceSignalsBlocked = ui->sampleSource->blockSignals(true);

View File

@ -54,47 +54,14 @@ void PluginAPI::removeChannelMarker(ChannelMarker* channelMarker)
m_mainWindow->removeChannelMarker(channelMarker);
}
/*
void PluginAPI::setSampleSource(SampleSource* sampleSource)
{
m_dspEngine->stopAcquistion();
m_dspEngine->setSource(sampleSource);
}
void PluginAPI::addSampleSink(SampleSink* sampleSink)
{
m_dspEngine->addSink(sampleSink);
}
void PluginAPI::removeSampleSink(SampleSink* sampleSink)
{
m_dspEngine->removeSink(sampleSink);
}
MessageQueue* PluginAPI::getDSPEngineMessageQueue()
{
return m_dspEngine->getInputMessageQueue();
}
void PluginAPI::addAudioSource(AudioFifo* audioFifo)
{
m_dspEngine->addAudioSink(audioFifo);
}
void PluginAPI::removeAudioSource(AudioFifo* audioFifo)
{
m_dspEngine->removeAudioSink(audioFifo);
}*/
void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface* plugin)
{
m_pluginManager->registerSampleSource(sourceName, plugin);
}
PluginAPI::PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow, DSPEngine* dspEngine) :
PluginAPI::PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow) :
QObject(mainWindow),
m_pluginManager(pluginManager),
m_mainWindow(mainWindow),
m_dspEngine(dspEngine)
m_mainWindow(mainWindow)
{
}

View File

@ -36,16 +36,6 @@ public:
void addChannelMarker(ChannelMarker* channelMarker);
void removeChannelMarker(ChannelMarker* channelMarker);
// DSPEngine access
/* Direct access with DSP engine singleton
void setSampleSource(SampleSource* sampleSource);
void addSampleSink(SampleSink* sampleSink);
void removeSampleSink(SampleSink* sampleSink);
MessageQueue* getDSPEngineMessageQueue();
void addAudioSource(AudioFifo* audioFifo);
void removeAudioSource(AudioFifo* audioFifo);
*/
// Sample Source stuff
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
@ -55,9 +45,8 @@ public:
protected:
PluginManager* m_pluginManager;
MainWindow* m_mainWindow;
DSPEngine* m_dspEngine;
PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow, DSPEngine* dspEngine);
PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow);
friend class PluginManager;
};

View File

@ -12,7 +12,7 @@
PluginManager::PluginManager(MainWindow* mainWindow, DSPEngine* dspEngine, QObject* parent) :
QObject(parent),
m_pluginAPI(this, mainWindow, dspEngine),
m_pluginAPI(this, mainWindow),
m_mainWindow(mainWindow),
m_dspEngine(dspEngine),
m_sampleSourceId(),