Is this going to fix 8 bit audio?

monitor
Phil Taylor 2021-08-14 17:15:59 +01:00
rodzic f17e69b4be
commit dc299fc4f7
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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();