From 824a91b1258707ba00f86b50957ea4676d519aa9 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Wed, 2 Feb 2022 16:02:40 +0000 Subject: [PATCH] Few more fixes --- servermain.cpp | 18 +++++++++--------- udpserver.cpp | 8 ++++---- udpserver.h | 2 ++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/servermain.cpp b/servermain.cpp index c354aee..0cf2795 100644 --- a/servermain.cpp +++ b/servermain.cpp @@ -403,7 +403,7 @@ void servermain::setServerToPrefs() } } - connect(udp, SIGNAL(haveNetworkStatus(QString)), this, SLOT(receiveStatusUpdate(QString))); + connect(udp, SIGNAL(haveNetworkStatus(networkStatus)), this, SLOT(receiveStatusUpdate(networkStatus))); serverThread->start(); @@ -554,14 +554,14 @@ void servermain::loadSettings() for (unsigned int i = 1; i < devices; i++) { info = audio->getDeviceInfo(i); if (info.outputChannels > 0) { - if (tempPrefs->txAudio.name == info->name) { - tempPrefs->txAudio.port = i; + if (tempPrefs->txAudioSetup.name == info->name) { + tempPrefs->txAudioSetup.port = i; txDeviceFound = true; } } if (info.inputChannels > 0) { - if (tempPrefs->rxAudio.name == info->name) { - tempPrefs->rxAudio.port = i; + if (tempPrefs->rxAudioSetup.name == info->name) { + tempPrefs->rxAudioSetup.port = i; rxDeviceFound = true; } } @@ -571,14 +571,14 @@ void servermain::loadSettings() { info = Pa_GetDeviceInfo(i); if (info->maxInputChannels > 0) { - if (tempPrefs->txAudio.name == info->name) { - tempPrefs->txAudio.port = i; + if (tempPrefs->txAudioSetup.name == info->name) { + tempPrefs->txAudioSetup.port = i; txDeviceFound = true; } } if (info->maxOutputChannels > 0) { - if (tempPrefs->rxAudio.name == info->name) { - tempPrefs->rxAudio.port = i; + if (tempPrefs->rxAudioSetup.name == info->name) { + tempPrefs->rxAudioSetup.port = i; rxDeviceFound = true; } } diff --git a/udpserver.cpp b/udpserver.cpp index 31ee926..03fd882 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -122,9 +122,8 @@ udpServer::~udpServer() udpAudio->close(); delete udpAudio; } - - //emit haveNetworkStatus(QString("")); - + status.message = QString(""); + emit haveNetworkStatus(status); } @@ -1455,7 +1454,8 @@ void udpServer::watchdog() } } - //emit haveNetworkStatus(QString("
Server connections: Control:%1 CI-V:%2 Audio:%3
").arg(controlClients.size()).arg(civClients.size()).arg(audioClients.size())); + status.message = QString("
Server connections: Control:%1 CI-V:%2 Audio:%3
").arg(controlClients.size()).arg(civClients.size()).arg(audioClients.size()); + emit haveNetworkStatus(status); } void udpServer::sendStatus(CLIENT* c) diff --git a/udpserver.h b/udpserver.h index 9f769df..ce5fa88 100644 --- a/udpserver.h +++ b/udpserver.h @@ -220,6 +220,8 @@ private: QHostAddress hasTxAudio; QTimer* wdTimer; + + networkStatus status; };