mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-01 16:38:06 -04:00
Multi device support: access DSPDeviceEngine from the channel plugins using the plubgin API and not a direct access
This commit is contained in:
@@ -59,6 +59,16 @@ void PluginAPI::registerSampleSource(const QString& sourceName, PluginInterface*
|
||||
m_pluginManager->registerSampleSource(sourceName, plugin);
|
||||
}
|
||||
|
||||
void PluginAPI::addThreadedSink(ThreadedSampleSink* sink)
|
||||
{
|
||||
m_pluginManager->addThreadedSink(sink);
|
||||
}
|
||||
|
||||
void PluginAPI::removeThreadedSink(ThreadedSampleSink* sink)
|
||||
{
|
||||
m_pluginManager->removeThreadedSink(sink);
|
||||
}
|
||||
|
||||
PluginAPI::PluginAPI(PluginManager* pluginManager, MainWindow* mainWindow) :
|
||||
QObject(mainWindow),
|
||||
m_pluginManager(pluginManager),
|
||||
|
||||
@@ -16,6 +16,7 @@ class AudioFifo;
|
||||
class MessageQueue;
|
||||
class MainWindow;
|
||||
class ChannelMarker;
|
||||
class ThreadedSampleSink;
|
||||
class PluginGUI;
|
||||
|
||||
class SDRANGEL_API PluginAPI : public QObject {
|
||||
@@ -39,6 +40,10 @@ public:
|
||||
// Sample Source stuff
|
||||
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
||||
|
||||
// Device engine stuff
|
||||
void addThreadedSink(ThreadedSampleSink* sink);
|
||||
void removeThreadedSink(ThreadedSampleSink* sink);
|
||||
|
||||
// R/O access to main window
|
||||
const MainWindow* getMainWindow() const { return m_mainWindow; }
|
||||
|
||||
|
||||
@@ -86,6 +86,16 @@ void PluginManager::registerSampleSource(const QString& sourceName, PluginInterf
|
||||
m_sampleSourceRegistrations.append(SampleSourceRegistration(sourceName, plugin));
|
||||
}
|
||||
|
||||
void PluginManager::addThreadedSink(ThreadedSampleSink* sink)
|
||||
{
|
||||
m_dspDeviceEngine->addThreadedSink(sink);
|
||||
}
|
||||
|
||||
void PluginManager::removeThreadedSink(ThreadedSampleSink* sink)
|
||||
{
|
||||
m_dspDeviceEngine->removeThreadedSink(sink);
|
||||
}
|
||||
|
||||
void PluginManager::loadSettings(const Preset* preset)
|
||||
{
|
||||
fprintf(stderr, "PluginManager::loadSettings: Loading preset [%s | %s]\n", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
|
||||
|
||||
@@ -15,6 +15,7 @@ class MainWindow;
|
||||
class SampleSource;
|
||||
class Message;
|
||||
class DSPDeviceEngine;
|
||||
class ThreadedSampleSink;
|
||||
|
||||
class SDRANGEL_API PluginManager : public QObject {
|
||||
Q_OBJECT
|
||||
@@ -48,6 +49,9 @@ public:
|
||||
|
||||
void registerSampleSource(const QString& sourceName, PluginInterface* plugin);
|
||||
|
||||
void addThreadedSink(ThreadedSampleSink* sink);
|
||||
void removeThreadedSink(ThreadedSampleSink* sink);
|
||||
|
||||
void loadSettings(const Preset* preset);
|
||||
void loadSourceSettings(const Preset* preset);
|
||||
void saveSettings(Preset* preset);
|
||||
|
||||
Reference in New Issue
Block a user