From eb5dc0d095858f0a2a137dc2674e660c1af47c3a Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sat, 14 Aug 2021 16:16:11 +0100 Subject: [PATCH] Update audiohandler.cpp --- audiohandler.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/audiohandler.cpp b/audiohandler.cpp index 166bceb..3819160 100644 --- a/audiohandler.cpp +++ b/audiohandler.cpp @@ -712,8 +712,7 @@ void audioHandler::getNextAudioChunk(QByteArray& ret) outPacket[f] = (unsigned char)compressedByte; } else { - int compressedByte = ((sample >> 8) ^ 0x80) & 0xff; - outPacket[f] = (unsigned char)compressedByte; + outPacket[f] = (unsigned char)(((sample + 32768) >> 8) & 0xff); } } packet.data.clear();