Added an additional combo box for the audio system selection under the

Radio Server page of settings.
knobtest
Elliott Liggett 2022-09-16 13:43:01 -07:00
rodzic aba2928d42
commit cf50e9d18a
3 zmienionych plików z 48 dodań i 5 usunięć

Wyświetl plik

@ -949,7 +949,6 @@ void wfmain::setupMainUI()
connect(this->trxadj, &transceiverAdjustments::setTPBFOuter,
[=](const unsigned char &newValue) { issueCmdUniquePriority(cmdSetTPBFOuter, newValue);}
);
}
void wfmain::prepareSettingsWindow()
@ -1531,7 +1530,10 @@ void wfmain::loadSettings()
prefs.audioSystem = static_cast<audioType>(settings->value("AudioSystem", defPrefs.audioSystem).toInt());
ui->audioSystemCombo->blockSignals(true);
ui->audioSystemServerCombo->blockSignals(true);
ui->audioSystemCombo->setCurrentIndex(prefs.audioSystem);
ui->audioSystemServerCombo->setCurrentIndex(prefs.audioSystem);
ui->audioSystemServerCombo->blockSignals(false);
ui->audioSystemCombo->blockSignals(false);
@ -3473,6 +3475,7 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
ui->connectBtn->setText("Disconnect"); // We must be connected now.
ui->audioSystemCombo->setEnabled(false);
ui->audioSystemServerCombo->setEnabled(false);
prepareWf(ui->wfLengthSlider->value());
if(usingLAN)
@ -4892,6 +4895,7 @@ void wfmain::on_connectBtn_clicked()
emit sendCloseComm();
ui->connectBtn->setText("Connect");
ui->audioSystemCombo->setEnabled(true);
ui->audioSystemServerCombo->setEnabled(true);
haveRigCaps = false;
rigName->setText("NONE");
}
@ -6222,6 +6226,18 @@ void wfmain::on_audioSystemCombo_currentIndexChanged(int value)
{
prefs.audioSystem = static_cast<audioType>(value);
setAudioDevicesUI(); // Force all audio devices to update
ui->audioSystemServerCombo->blockSignals(true);
ui->audioSystemServerCombo->setCurrentIndex(value);
ui->audioSystemServerCombo->blockSignals(false);
}
void wfmain::on_audioSystemServerCombo_currentIndexChanged(int value)
{
prefs.audioSystem = static_cast<audioType>(value);
setAudioDevicesUI(); // Force all audio devices to update
ui->audioSystemCombo->blockSignals(true);
ui->audioSystemCombo->setCurrentIndex(value);
ui->audioSystemCombo->blockSignals(false);
}
void wfmain::on_topLevelSlider_valueChanged(int value)
@ -7077,4 +7093,3 @@ void wfmain::messageHandler(QtMsgType type, const QMessageLogContext& context, c
logStringBuffer.push_front(text);
logTextMutex.unlock();
}

Wyświetl plik

@ -643,6 +643,8 @@ private slots:
void on_showLogBtn_clicked();
void on_audioSystemServerCombo_currentIndexChanged(int index);
private:
Ui::wfmain *ui;
void closeEvent(QCloseEvent *event);

Wyświetl plik

@ -18,7 +18,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="mainTab">
<attribute name="title">
@ -2809,7 +2809,7 @@
<widget class="QComboBox" name="audioSystemCombo">
<item>
<property name="text">
<string>QT Audio</string>
<string>Qt Audio</string>
</property>
</item>
<item>
@ -4185,7 +4185,7 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_33">
<layout class="QHBoxLayout" name="serverAudioHorizLayout">
<item>
<widget class="QLabel" name="label_33">
<property name="text">
@ -4232,6 +4232,32 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_44">
<property name="text">
<string>Audio System</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="audioSystemServerCombo">
<item>
<property name="text">
<string>Qt Audio</string>
</property>
</item>
<item>
<property name="text">
<string>PortAudio</string>
</property>
</item>
<item>
<property name="text">
<string>RT Audio</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_23">
<property name="orientation">