1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Multi device support: channel plugin per device mechanism validation with AM demod

This commit is contained in:
f4exb
2016-05-16 03:21:21 +02:00
parent 7412ee0d54
commit bbb4bc28b4
20 changed files with 102 additions and 53 deletions
+4 -4
View File
@@ -126,7 +126,7 @@ void PluginManager::removeThreadedSink(ThreadedSampleSink* sink)
m_dspDeviceEngine->removeThreadedSink(sink);
}
void PluginManager::loadSettings(const Preset* preset)
void PluginManager::loadSettings(const Preset* preset, DeviceAPI *deviceAPI)
{
fprintf(stderr, "PluginManager::loadSettings: Loading preset [%s | %s]\n", qPrintable(preset->getGroup()), qPrintable(preset->getDescription()));
@@ -163,7 +163,7 @@ void PluginManager::loadSettings(const Preset* preset)
if(m_channelRegistrations[i].m_channelName == channelConfig.m_channel)
{
qDebug("PluginManager::loadSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel));
reg = ChannelInstanceRegistration(channelConfig.m_channel, m_channelRegistrations[i].m_plugin->createChannel(channelConfig.m_channel));
reg = ChannelInstanceRegistration(channelConfig.m_channel, m_channelRegistrations[i].m_plugin->createChannel(channelConfig.m_channel, deviceAPI));
break;
}
}
@@ -541,11 +541,11 @@ void PluginManager::populateChannelComboBox(QComboBox *channels)
}
}
void PluginManager::createChannelInstance(int channelPluginIndex)
void PluginManager::createChannelInstance(int channelPluginIndex, DeviceAPI *deviceAPI)
{
if (channelPluginIndex < m_channelRegistrations.size())
{
PluginInterface *pluginInterface = m_channelRegistrations[channelPluginIndex].m_plugin;
pluginInterface->createChannel(m_channelRegistrations[channelPluginIndex].m_channelName);
pluginInterface->createChannel(m_channelRegistrations[channelPluginIndex].m_channelName, deviceAPI);
}
}