Skip to content

Commit

Permalink
FIX(client): Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartmnt committed Oct 15, 2024
1 parent cb01bfa commit 835599d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/mumble/AudioWizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include <cmath>

#include <QDebug>

AudioWizard::AudioWizard(QWidget *p) : QWizard(p) {
bInit = true;
bLastActive = false;
Expand Down Expand Up @@ -47,11 +49,17 @@ AudioWizard::AudioWizard(QWidget *p) : QWizard(p) {
if (AudioInputRegistrar::qmNew) {
foreach (AudioInputRegistrar *air, *AudioInputRegistrar::qmNew) {
qcbInput->addItem(air->name);
qDebug() << air->name;
if (air->name == AudioInputRegistrar::current) {
qDebug() << "is current";
qcbInput->setCurrentIndex(qcbInput->count() - 1);
EchoCancelOptionID echoCancelOptionId = firstUsableEchoCancellation(air, qcbOutput->currentText());
if (echoCancelOptionId != EchoCancelOptionID::DISABLED) {
qDebug() << "echoCancelOptionId "
<< " is not disabled";
qcbEcho->setEnabled(true);
qDebug() << "echoOPtion"
<< " disabled?" << (Global::get().s.echoOption != EchoCancelOptionID::DISABLED);
qcbEcho->setChecked(Global::get().s.echoOption != EchoCancelOptionID::DISABLED);
}
}
Expand Down Expand Up @@ -244,6 +252,8 @@ void AudioWizard::on_qcbInputDevice_activated(int) {
}

EchoCancelOptionID echoCancelOptionId = firstUsableEchoCancellation(air, qcbOutput->currentText());
qDebug() << "inputDeviceActivated echoCancelOptionId "
<< " disabled?" << (echoCancelOptionId != EchoCancelOptionID::DISABLED);
qcbEcho->setEnabled(echoCancelOptionId != EchoCancelOptionID::DISABLED);

Global::get().ai = AudioInputPtr(air->create());
Expand Down Expand Up @@ -286,6 +296,8 @@ void AudioWizard::on_qcbOutputDevice_activated(int) {

AudioInputRegistrar *air = AudioInputRegistrar::qmNew->value(qcbInput->currentText());
EchoCancelOptionID echoCancelOptionId = firstUsableEchoCancellation(air, qcbOutput->currentText());
qDebug() << "outputDeviceActivated echoCancelOptionId"
<< " disabled?" << (echoCancelOptionId != EchoCancelOptionID::DISABLED);
qcbEcho->setEnabled(echoCancelOptionId != EchoCancelOptionID::DISABLED);

Global::get().ao = AudioOutputPtr(aor->create());
Expand Down Expand Up @@ -684,6 +696,7 @@ void AudioWizard::on_qpbPTT_clicked() {
}

void AudioWizard::on_qcbEcho_clicked(bool on) {
qDebug() << "echoClicked on:" << on;
if (on) {
AudioInputRegistrar *air = AudioInputRegistrar::qmNew->value(qcbInput->currentText());
Global::get().s.echoOption = firstUsableEchoCancellation(air, qcbOutput->currentText());
Expand Down

0 comments on commit 835599d

Please sign in to comment.