diff --git a/plugins/channelrx/demodam/amdemod.cpp b/plugins/channelrx/demodam/amdemod.cpp index bc70f0ff9..7670e8e88 100644 --- a/plugins/channelrx/demodam/amdemod.cpp +++ b/plugins/channelrx/demodam/amdemod.cpp @@ -193,10 +193,10 @@ void AMDemod::applySettings(const AMDemodSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/demodbfm/bfmdemod.cpp b/plugins/channelrx/demodbfm/bfmdemod.cpp index 12e709fd4..fce7a68fb 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.cpp +++ b/plugins/channelrx/demodbfm/bfmdemod.cpp @@ -188,10 +188,10 @@ void BFMDemod::applySettings(const BFMDemodSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/demoddsd/dsddemod.cpp b/plugins/channelrx/demoddsd/dsddemod.cpp index d73aaaf50..60196861a 100644 --- a/plugins/channelrx/demoddsd/dsddemod.cpp +++ b/plugins/channelrx/demoddsd/dsddemod.cpp @@ -228,10 +228,10 @@ void DSDDemod::applySettings(const DSDDemodSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/demodfreedv/freedvdemod.cpp b/plugins/channelrx/demodfreedv/freedvdemod.cpp index 29e1ebf12..e288389eb 100644 --- a/plugins/channelrx/demodfreedv/freedvdemod.cpp +++ b/plugins/channelrx/demodfreedv/freedvdemod.cpp @@ -182,10 +182,10 @@ void FreeDVDemod::applySettings(const FreeDVDemodSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/demodnfm/nfmdemod.cpp b/plugins/channelrx/demodnfm/nfmdemod.cpp index 8802ed2ba..a5a5760fb 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.cpp +++ b/plugins/channelrx/demodnfm/nfmdemod.cpp @@ -211,10 +211,10 @@ void NFMDemod::applySettings(const NFMDemodSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp index 272088771..b799e7713 100644 --- a/plugins/channelrx/demodssb/ssbdemod.cpp +++ b/plugins/channelrx/demodssb/ssbdemod.cpp @@ -211,10 +211,10 @@ void SSBDemod::applySettings(const SSBDemodSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/demodwfm/wfmdemod.cpp b/plugins/channelrx/demodwfm/wfmdemod.cpp index 8d7835352..5aaed7a18 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.cpp +++ b/plugins/channelrx/demodwfm/wfmdemod.cpp @@ -189,10 +189,10 @@ void WFMDemod::applySettings(const WFMDemodSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/freqtracker/freqtracker.cpp b/plugins/channelrx/freqtracker/freqtracker.cpp index 2731ffa9f..357393960 100644 --- a/plugins/channelrx/freqtracker/freqtracker.cpp +++ b/plugins/channelrx/freqtracker/freqtracker.cpp @@ -234,10 +234,10 @@ void FreqTracker::applySettings(const FreqTrackerSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/localsink/localsink.cpp b/plugins/channelrx/localsink/localsink.cpp index 25d801e9b..829ecd903 100644 --- a/plugins/channelrx/localsink/localsink.cpp +++ b/plugins/channelrx/localsink/localsink.cpp @@ -280,10 +280,10 @@ void LocalSink::applySettings(const LocalSinkSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSink(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/remotesink/remotesink.cpp b/plugins/channelrx/remotesink/remotesink.cpp index 4891ea318..34bdcf5ce 100644 --- a/plugins/channelrx/remotesink/remotesink.cpp +++ b/plugins/channelrx/remotesink/remotesink.cpp @@ -214,10 +214,10 @@ void RemoteSink::applySettings(const RemoteSinkSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSink(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channelrx/udpsink/udpsink.cpp b/plugins/channelrx/udpsink/udpsink.cpp index 9fae9b9b1..b216278f9 100644 --- a/plugins/channelrx/udpsink/udpsink.cpp +++ b/plugins/channelrx/udpsink/udpsink.cpp @@ -212,10 +212,10 @@ void UDPSink::applySettings(const UDPSinkSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSinkAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSink(this, settings.m_streamIndex); - m_deviceAPI->addChannelSinkAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSinkAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/filesource/filesource.cpp b/plugins/channeltx/filesource/filesource.cpp index b1786a2ce..29a96a254 100644 --- a/plugins/channeltx/filesource/filesource.cpp +++ b/plugins/channeltx/filesource/filesource.cpp @@ -234,10 +234,10 @@ void FileSource::applySettings(const FileSourceSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/localsource/localsource.cpp b/plugins/channeltx/localsource/localsource.cpp index 0261dabe0..6268c35ac 100644 --- a/plugins/channeltx/localsource/localsource.cpp +++ b/plugins/channeltx/localsource/localsource.cpp @@ -283,10 +283,10 @@ void LocalSource::applySettings(const LocalSourceSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index 557c94b12..a812851c6 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -278,10 +278,10 @@ void AMMod::applySettings(const AMModSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index 04fe3be8a..467843cd9 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -298,10 +298,10 @@ void ATVMod::applySettings(const ATVModSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/modfreedv/freedvmod.cpp b/plugins/channeltx/modfreedv/freedvmod.cpp index 89e7fc9d2..38a56c30e 100644 --- a/plugins/channeltx/modfreedv/freedvmod.cpp +++ b/plugins/channeltx/modfreedv/freedvmod.cpp @@ -264,10 +264,10 @@ void FreeDVMod::applySettings(const FreeDVModSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index c403286b2..2f7f1b0b0 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -324,10 +324,10 @@ void NFMMod::applySettings(const NFMModSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index 9224bf470..3b2c02c17 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -281,10 +281,10 @@ void SSBMod::applySettings(const SSBModSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index 9a30054ac..a71c20553 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -264,10 +264,10 @@ void WFMMod::applySettings(const WFMModSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/remotesource/remotesource.cpp b/plugins/channeltx/remotesource/remotesource.cpp index 1a739b39f..180f90cdb 100644 --- a/plugins/channeltx/remotesource/remotesource.cpp +++ b/plugins/channeltx/remotesource/remotesource.cpp @@ -180,10 +180,10 @@ void RemoteSource::applySettings(const RemoteSourceSettings& settings, bool forc { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/plugins/channeltx/udpsource/udpsource.cpp b/plugins/channeltx/udpsource/udpsource.cpp index 94c92efeb..910f9197b 100644 --- a/plugins/channeltx/udpsource/udpsource.cpp +++ b/plugins/channeltx/udpsource/udpsource.cpp @@ -224,10 +224,10 @@ void UDPSource::applySettings(const UDPSourceSettings& settings, bool force) { if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only { - m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex); + m_deviceAPI->removeChannelSourceAPI(this); m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex); m_deviceAPI->addChannelSource(this, settings.m_streamIndex); - m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex); + m_deviceAPI->addChannelSourceAPI(this); } reverseAPIKeys.append("streamIndex"); diff --git a/sdrbase/device/deviceapi.cpp b/sdrbase/device/deviceapi.cpp index 557efe165..226659acd 100644 --- a/sdrbase/device/deviceapi.cpp +++ b/sdrbase/device/deviceapi.cpp @@ -137,17 +137,14 @@ void DeviceAPI::removeMIMOChannel(MIMOChannel* channel) } } -void DeviceAPI::addChannelSinkAPI(ChannelAPI* channelAPI, int streamIndex) +void DeviceAPI::addChannelSinkAPI(ChannelAPI* channelAPI) { - (void) streamIndex; m_channelSinkAPIs.append(channelAPI); renumerateChannels(); } -void DeviceAPI::removeChannelSinkAPI(ChannelAPI* channelAPI, int streamIndex) +void DeviceAPI::removeChannelSinkAPI(ChannelAPI* channelAPI) { - (void) streamIndex; - if (m_channelSinkAPIs.removeOne(channelAPI)) { renumerateChannels(); } @@ -155,17 +152,14 @@ void DeviceAPI::removeChannelSinkAPI(ChannelAPI* channelAPI, int streamIndex) channelAPI->setIndexInDeviceSet(-1); } -void DeviceAPI::addChannelSourceAPI(ChannelAPI* channelAPI, int streamIndex) +void DeviceAPI::addChannelSourceAPI(ChannelAPI* channelAPI) { - (void) streamIndex; m_channelSourceAPIs.append(channelAPI); renumerateChannels(); } -void DeviceAPI::removeChannelSourceAPI(ChannelAPI* channelAPI, int streamIndex) +void DeviceAPI::removeChannelSourceAPI(ChannelAPI* channelAPI) { - (void) streamIndex; - if (m_channelSourceAPIs.removeOne(channelAPI)) { renumerateChannels(); } diff --git a/sdrbase/device/deviceapi.h b/sdrbase/device/deviceapi.h index 3b1b938a8..6c2821a67 100644 --- a/sdrbase/device/deviceapi.h +++ b/sdrbase/device/deviceapi.h @@ -77,10 +77,10 @@ public: void addMIMOChannel(MIMOChannel* channel); //!< Add a MIMO channel (n Rx and m Tx combination) void removeMIMOChannel(MIMOChannel* channe); //!< Remove a MIMO channel (n Rx and m Tx combination) - void addChannelSinkAPI(ChannelAPI* channelAPI, int streamIndex = 0); - void removeChannelSinkAPI(ChannelAPI* channelAPI, int streamIndex = 0); - void addChannelSourceAPI(ChannelAPI* channelAPI, int streamIndex = 0); - void removeChannelSourceAPI(ChannelAPI* channelAPI, int streamIndex = 0); + void addChannelSinkAPI(ChannelAPI* channelAPI); + void removeChannelSinkAPI(ChannelAPI* channelAPI); + void addChannelSourceAPI(ChannelAPI* channelAPI); + void removeChannelSourceAPI(ChannelAPI* channelAPI); void addMIMOChannelAPI(ChannelAPI* channelAPI); void removeMIMOChannelAPI(ChannelAPI* channelAPI);