diff --git a/plugins/channelrx/localsink/localsink.cpp b/plugins/channelrx/localsink/localsink.cpp index b2d5cfefb..957732503 100644 --- a/plugins/channelrx/localsink/localsink.cpp +++ b/plugins/channelrx/localsink/localsink.cpp @@ -429,6 +429,9 @@ void LocalSink::webapiUpdateChannelSettings( validateFilterChainHash(settings); } + if (channelSettingsKeys.contains("play")) { + settings.m_play = response.getLocalSinkSettings()->getPlay() != 0; + } if (channelSettingsKeys.contains("streamIndex")) { settings.m_streamIndex = response.getLocalSinkSettings()->getStreamIndex(); } @@ -462,6 +465,7 @@ void LocalSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res response.getLocalSinkSettings()->setLog2Decim(settings.m_log2Decim); response.getLocalSinkSettings()->setFilterChainHash(settings.m_filterChainHash); + response.getLocalSinkSettings()->setPlay(settings.m_play ? 1 : 0); response.getLocalSinkSettings()->setStreamIndex(settings.m_streamIndex); response.getLocalSinkSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); @@ -503,6 +507,9 @@ void LocalSink::webapiReverseSendSettings(QList& channelSettingsKeys, c if (channelSettingsKeys.contains("filterChainHash") || force) { swgLocalSinkSettings->setFilterChainHash(settings.m_filterChainHash); } + if (channelSettingsKeys.contains("play") || force) { + swgLocalSinkSettings->setPlay(settings.m_play ? 1 : 0); + } if (channelSettingsKeys.contains("streamIndex") || force) { swgLocalSinkSettings->setStreamIndex(settings.m_streamIndex); } diff --git a/plugins/channelrx/localsink/localsinkgui.cpp b/plugins/channelrx/localsink/localsinkgui.cpp index ec462d095..fa85111cd 100644 --- a/plugins/channelrx/localsink/localsinkgui.cpp +++ b/plugins/channelrx/localsink/localsinkgui.cpp @@ -193,6 +193,13 @@ void LocalSinkGUI::displaySettings() setWindowTitle(m_channelMarker.getTitle()); blockApplySettings(true); + int index = getLocalDeviceIndexInCombo(m_settings.m_localDeviceIndex); + + if (index >= 0) { + ui->localDevice->setCurrentIndex(index); + } + + ui->localDevicePlay->setChecked(m_settings.m_play); ui->decimationFactor->setCurrentIndex(m_settings.m_log2Decim); applyDecimation(); displayStreamIndex();