mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-04 06:54:39 -04:00
Replace separate create channel methods (BS and CS): common plugins
This commit is contained in:
@@ -54,6 +54,22 @@ void AMModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(AMMod::m_channelIdURI, AMMod::m_channelId, this);
|
||||
}
|
||||
|
||||
void AMModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
AMMod *instance = new AMMod(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* AMModPlugin::createTxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@@ -68,16 +84,6 @@ PluginInstanceGUI* AMModPlugin::createTxChannelGUI(DeviceUISet *deviceUISet, Bas
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSource* AMModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new AMMod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* AMModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new AMMod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* AMModPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new AMModWebAPIAdapter();
|
||||
|
||||
Reference in New Issue
Block a user