Skip to content

Commit

Permalink
linked local audio decoding setting to mute to save CPU if needed. A …
Browse files Browse the repository at this point in the history
…bit of a patched solution but should be ok for most
  • Loading branch information
jontio committed Aug 7, 2021
1 parent f821bb6 commit 316d92b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions JAERO/gui_classes/settingsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -607,20 +607,20 @@ eg &quot;localhost:12345 localhost:12346&quot;</string>
<rect>
<x>20</x>
<y>30</y>
<width>171</width>
<width>331</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>JAERO voice decoding</string>
<string>Local voice decoding in JAERO</string>
</property>
</widget>
<widget class="QCheckBox" name="remoteAmbeEnabled">
<property name="geometry">
<rect>
<x>20</x>
<y>70</y>
<width>171</width>
<width>261</width>
<height>17</height>
</rect>
</property>
Expand Down
12 changes: 12 additions & 0 deletions JAERO/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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"<<mute;
}

void MainWindow::on_actionReduce_CPU_triggered(bool checked)
Expand Down

0 comments on commit 316d92b

Please sign in to comment.