diff --git a/udphandler.cpp b/udphandler.cpp index b419f72..8ee3bf8 100644 --- a/udphandler.cpp +++ b/udphandler.cpp @@ -701,7 +701,7 @@ udpAudio::udpAudio(QHostAddress local, QHostAddress ip, quint16 audioPort, audio this->port = audioPort; this->radioIP = ip; - if (txSampleRate == 0) { + if (txSetup.samplerate == 0) { enableTx = false; } @@ -836,6 +836,7 @@ void udpAudio::sendTxAudio() } QByteArray audio; txaudio->getNextAudioChunk(audio); + if (audio.length() > 0) { int counter = 1; int len = 0; diff --git a/udphandler.h b/udphandler.h index 4272166..25980c1 100644 --- a/udphandler.h +++ b/udphandler.h @@ -221,7 +221,7 @@ private: QThread* txAudioThread = Q_NULLPTR; QTimer* txAudioTimer=Q_NULLPTR; - bool enableTx = 1; + bool enableTx = true; };