From dc299fc4f7649b45a7ee1e4bdc0a563d434cca83 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sat, 14 Aug 2021 17:15:59 +0100 Subject: [PATCH] Is this going to fix 8 bit audio? --- audiohandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audiohandler.cpp b/audiohandler.cpp index 5838c8b..e05b226 100644 --- a/audiohandler.cpp +++ b/audiohandler.cpp @@ -709,11 +709,11 @@ void audioHandler::getNextAudioChunk(QByteArray& ret) int exponent = (int)MuLawCompressTable[(sample >> 7) & 0xFF]; int mantissa = (sample >> (exponent + 3)) & 0x0F; int compressedByte = ~(sign | (exponent << 4) | mantissa); - outPacket[f] = (unsigned char)compressedByte; + outPacket[f] = (quint8)compressedByte; } else { int compressedByte = (((sample + 32768) >> 8) & 0xff); - outPacket[f] = (unsigned char)compressedByte; + outPacket[f] = (quint8)compressedByte; } } packet.data.clear();