diff --git a/plugins/channeltx/filesource/filesource.cpp b/plugins/channeltx/filesource/filesource.cpp index 64f466d16..b1786a2ce 100644 --- a/plugins/channeltx/filesource/filesource.cpp +++ b/plugins/channeltx/filesource/filesource.cpp @@ -230,6 +230,19 @@ void FileSource::applySettings(const FileSourceSettings& settings, bool force) reverseAPIKeys.append("gainDB"); } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + FileSourceBaseband::MsgConfigureFileSourceBaseband *msg = FileSourceBaseband::MsgConfigureFileSourceBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg); diff --git a/plugins/channeltx/localsource/localsource.cpp b/plugins/channeltx/localsource/localsource.cpp index 2e2f342da..45e2ce8d3 100644 --- a/plugins/channeltx/localsource/localsource.cpp +++ b/plugins/channeltx/localsource/localsource.cpp @@ -286,6 +286,22 @@ void LocalSource::applySettings(const LocalSourceSettings& settings, bool force) m_basebandSource->getInputMessageQueue()->push(msg); } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + + LocalSourceBaseband::MsgConfigureLocalSourceBaseband *msg = LocalSourceBaseband::MsgConfigureLocalSourceBaseband::create(settings, force); + m_basebandSource->getInputMessageQueue()->push(msg); + if ((settings.m_useReverseAPI) && (reverseAPIKeys.size() != 0)) { bool fullUpdate = ((m_settings.m_useReverseAPI != settings.m_useReverseAPI) && settings.m_useReverseAPI) || diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index 25b9a848b..04fe3be8a 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -294,6 +294,19 @@ void ATVMod::applySettings(const ATVModSettings& settings, bool force) reverseAPIKeys.append("overlayText"); } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + ATVModBaseband::MsgConfigureATVModBaseband *msg = ATVModBaseband::MsgConfigureATVModBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg); diff --git a/plugins/channeltx/modfreedv/freedvmod.cpp b/plugins/channeltx/modfreedv/freedvmod.cpp index d95a51f9a..a4b6716d3 100644 --- a/plugins/channeltx/modfreedv/freedvmod.cpp +++ b/plugins/channeltx/modfreedv/freedvmod.cpp @@ -286,6 +286,19 @@ void FreeDVMod::applySettings(const FreeDVModSettings& settings, bool force) } } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + FreeDVModBaseband::MsgConfigureFreeDVModBaseband *msg = FreeDVModBaseband::MsgConfigureFreeDVModBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg); diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 14dabebf6..0036e5bde 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -360,6 +360,19 @@ void NFMMod::applySettings(const NFMModSettings& settings, bool force) } } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + NFMModBaseband::MsgConfigureNFMModBaseband *msg = NFMModBaseband::MsgConfigureNFMModBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg); diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index d66f21e04..67fb7b291 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -315,6 +315,19 @@ void SSBMod::applySettings(const SSBModSettings& settings, bool force) } } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + SSBModBaseband::MsgConfigureSSBModBaseband *msg = SSBModBaseband::MsgConfigureSSBModBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg); diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index cf2e3cea6..6dc3a76d8 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -287,6 +287,19 @@ void WFMMod::applySettings(const WFMModSettings& settings, bool force) } } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + WFMModBaseband::MsgConfigureWFMModBaseband *msg = WFMModBaseband::MsgConfigureWFMModBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg); diff --git a/plugins/channeltx/remotesource/remotesource.cpp b/plugins/channeltx/remotesource/remotesource.cpp index 55ef98193..1a739b39f 100644 --- a/plugins/channeltx/remotesource/remotesource.cpp +++ b/plugins/channeltx/remotesource/remotesource.cpp @@ -176,6 +176,19 @@ void RemoteSource::applySettings(const RemoteSourceSettings& settings, bool forc reverseAPIKeys.append("dataPort"); } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + RemoteSourceBaseband::MsgConfigureRemoteSourceBaseband *msg = RemoteSourceBaseband::MsgConfigureRemoteSourceBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg); diff --git a/plugins/channeltx/udpsource/udpsource.cpp b/plugins/channeltx/udpsource/udpsource.cpp index 6ec062c23..94c92efeb 100644 --- a/plugins/channeltx/udpsource/udpsource.cpp +++ b/plugins/channeltx/udpsource/udpsource.cpp @@ -220,6 +220,19 @@ void UDPSource::applySettings(const UDPSourceSettings& settings, bool force) reverseAPIKeys.append("stereoInput"); } + if (m_settings.m_streamIndex != settings.m_streamIndex) + { + if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only + { + m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); + m_deviceAPI->addChannelSource(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + } + + reverseAPIKeys.append("streamIndex"); + } + UDPSourceBaseband::MsgConfigureUDPSourceBaseband *msg = UDPSourceBaseband::MsgConfigureUDPSourceBaseband::create(settings, force); m_basebandSource->getInputMessageQueue()->push(msg);