From 316d92b8b1512522f829e2b3cea22d204129ecac Mon Sep 17 00:00:00 2001 From: jontio Date: Sun, 8 Aug 2021 11:05:29 +1200 Subject: [PATCH] linked local audio decoding setting to mute to save CPU if needed. A bit of a patched solution but should be ok for most --- JAERO/gui_classes/settingsdialog.ui | 6 +++--- JAERO/mainwindow.cpp | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/JAERO/gui_classes/settingsdialog.ui b/JAERO/gui_classes/settingsdialog.ui index a76c5f5..a427732 100644 --- a/JAERO/gui_classes/settingsdialog.ui +++ b/JAERO/gui_classes/settingsdialog.ui @@ -607,12 +607,12 @@ eg "localhost:12345 localhost:12346" 20 30 - 171 + 331 17 - JAERO voice decoding + Local voice decoding in JAERO @@ -620,7 +620,7 @@ eg "localhost:12345 localhost:12346" 20 70 - 171 + 261 17 diff --git a/JAERO/mainwindow.cpp b/JAERO/mainwindow.cpp index ac32192..3625a9a 100644 --- a/JAERO/mainwindow.cpp +++ b/JAERO/mainwindow.cpp @@ -979,6 +979,17 @@ void MainWindow::acceptsettings() if(settingsdialog->zmqAudioInputEnabled)sourcelabel->setText(" "+settingsdialog->zmqAudioInputTopic+" "); else sourcelabel->setText(" "+settingsdialog->audioinputdevice.deviceName()+" "); + if(settingsdialog->localAudioOutEnabled&&(!ui->actionSound_Out->isVisible())) + { + on_actionSound_Out_toggled(false); + ui->actionSound_Out->setVisible(true); + } + else if(!settingsdialog->localAudioOutEnabled) + { + on_actionSound_Out_toggled(true); + ui->actionSound_Out->setVisible(false); + } + //start or stop tcp server/client if(settingsdialog->tcp_for_ads_messages_enabled)sbs1->starttcpconnection(settingsdialog->tcp_for_ads_messages_address,settingsdialog->tcp_for_ads_messages_port,settingsdialog->tcp_as_client_enabled); else sbs1->stoptcpconnection(); @@ -1380,6 +1391,7 @@ void MainWindow::on_actionSound_Out_toggled(bool mute) connect(ambe,SIGNAL(decoded_signal(QByteArray)),audioout,SLOT(audioin(QByteArray))); audioout->start(); } + qDebug()<<"on_actionSound_Out_toggled"<