Add debugging and fix silly error in audiooutput combobox

merge-requests/4/head
Phil Taylor 2021-05-22 17:02:51 +01:00
rodzic ed566deb0e
commit 5ee6ff48ba
4 zmienionych plików z 13 dodań i 2 usunięć

Wyświetl plik

@ -747,14 +747,17 @@ audioHandler::~audioHandler()
if (audioOutput != Q_NULLPTR) {
audioOutput->stop();
delete audioOutput;
qDebug(logAudio()) << "Audio output stopped";
}
if (audioInput != Q_NULLPTR) {
audioInput->stop();
delete audioInput;
qDebug(logAudio()) << "Audio input stopped";
}
if (resampler != NULL) {
speex_resampler_destroy(resampler);
qDebug(logAudio()) << "Resampler closed";
}
}

Wyświetl plik

@ -147,6 +147,7 @@ void rigCommander::commSetup(unsigned char rigCivAddr, udpPreferences prefs, QSt
void rigCommander::closeComm()
{
qDebug(logRig()) << "Closing rig comms";
if (comm != Q_NULLPTR) {
delete comm;
}

Wyświetl plik

@ -790,6 +790,7 @@ udpAudio::~udpAudio()
{
if (pingTimer != Q_NULLPTR)
{
qDebug(logUdp()) << "Stopping pingTimer";
pingTimer->stop();
delete pingTimer;
pingTimer = Q_NULLPTR;
@ -797,6 +798,7 @@ udpAudio::~udpAudio()
if (idleTimer != Q_NULLPTR)
{
qDebug(logUdp()) << "Stopping idleTimer";
idleTimer->stop();
delete idleTimer;
idleTimer = Q_NULLPTR;
@ -804,6 +806,7 @@ udpAudio::~udpAudio()
if (watchdogTimer != Q_NULLPTR)
{
qDebug(logUdp()) << "Stopping watchdogTimer";
watchdogTimer->stop();
delete watchdogTimer;
watchdogTimer = Q_NULLPTR;
@ -811,19 +814,23 @@ udpAudio::~udpAudio()
if (txAudioTimer != Q_NULLPTR)
{
qDebug(logUdp()) << "Stopping txaudio timer";
txAudioTimer->stop();
delete txAudioTimer;
}
if (rxAudioThread != Q_NULLPTR) {
qDebug(logUdp()) << "Stopping rxaudio thread";
rxAudioThread->quit();
rxAudioThread->wait();
}
if (txAudioThread != Q_NULLPTR) {
qDebug(logUdp()) << "Stopping txaudio thread";
txAudioThread->quit();
txAudioThread->wait();
}
qDebug(logUdp()) << "udpHandler successfully closed";
}
void udpAudio::watchdog()
@ -895,7 +902,7 @@ void udpAudio::dataReceived()
{
while (udp->hasPendingDatagrams()) {
QNetworkDatagram datagram = udp->receiveDatagram();
//qInfo(logUdp()) << "Received: " << datagram.data();
//qInfo(logUdp()) << "Received: " << datagram.data().mid(0,10);
QByteArray r = datagram.data();
switch (r.length())

Wyświetl plik

@ -1085,7 +1085,7 @@ void wfmain::loadSettings()
ui->audioSampleRateCombo->setEnabled(ui->lanEnableBtn->isChecked());
int audioSampleRateIndex = ui->audioSampleRateCombo->findText(QString::number(udpDefPrefs.audioRXSampleRate));
if (audioSampleRateIndex != -1) {
ui->audioOutputCombo->setCurrentIndex(audioSampleRateIndex);
ui->audioSampleRateCombo->setCurrentIndex(audioSampleRateIndex);
}
// Add codec combobox items here so that we can add userdata!