From 3db187e0a5ab8c0470acd4e25d7b5d3ff1b30a7f Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Fri, 28 May 2021 18:13:08 +0100 Subject: [PATCH] Update audiohandler.cpp --- audiohandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/audiohandler.cpp b/audiohandler.cpp index d167d0e..a37085e 100644 --- a/audiohandler.cpp +++ b/audiohandler.cpp @@ -180,6 +180,11 @@ int audioHandler::readData(void* outputBuffer, void* inputBuffer, unsigned int n memcpy(buffer + sentlen, tempBuf.data.constData() + tempBuf.sent, send); tempBuf.sent = tempBuf.sent + send; sentlen = sentlen + send; + if (tempBuf.sent != tempBuf.data.length()) + { + // We still don't have enough buffer space for this? + return 0; + } //qDebug(logAudio()) << "Adding partial:" << send; }