From ab36165d9db4eb9b878b8cdc087ac9cee3f98717 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Mon, 2 May 2022 11:52:09 +0100 Subject: [PATCH] Revert "Update audiohandler.cpp" This reverts commit 7130f71335487e38bc98a6dd905ac6dff0cd0f55. --- audiohandler.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/audiohandler.cpp b/audiohandler.cpp index 90b6083..45cc2d4 100644 --- a/audiohandler.cpp +++ b/audiohandler.cpp @@ -269,8 +269,10 @@ void audioHandler::incomingAudio(audioPacket inPacket) { - QTime startProcessing = QTime::currentTime(); - + if (lastReceived.msecsTo(QTime::currentTime()) > 30) { + qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Time since last audio packet" << lastReceived.msecsTo(QTime::currentTime()) << "Expected around" << setup.blockSize; + } + lastReceived = QTime::currentTime(); audioPacket livePacket = inPacket; // Process uLaw. if (setup.ulaw) @@ -448,11 +450,6 @@ void audioHandler::incomingAudio(audioPacket inPacket) if (audioDevice != Q_NULLPTR) { audioDevice->write(livePacket.data); - if (lastReceived.msecsTo(QTime::currentTime()) > 30) { - qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Time since last audio packet" << lastReceived.msecsTo(QTime::currentTime()) << "Expected around" << setup.blockSize << "Processing time" << startProcessing.msecsTo(QTime::currentTime()); - } - lastReceived = QTime::currentTime(); - } if ((inPacket.seq > lastSentSeq + 1) && (setup.codec == 0x40 || setup.codec == 0x80)) { qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Attempting FEC on packet" << inPacket.seq << "as last is" << lastSentSeq; @@ -650,7 +647,7 @@ void audioHandler::getNextAudioChunk() } emit haveAudioData(livePacket); if (lastReceived.msecsTo(QTime::currentTime()) > 30) { - qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Time since last audio packet" << lastReceived.msecsTo(QTime::currentTime()) << "Expected around" << setup.blockSize << "Processing time" << startProcessing.msecsTo(QTime::currentTime()); + qDebug(logAudio()) << (setup.isinput ? "Input" : "Output") << "Time since last audio packet" << lastReceived.msecsTo(QTime::currentTime()) << "Expected around" << setup.blockSize << "Processing time" <