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