Cog Audio converter: Fix handling signed versus unsigned for 8 bit samples

CQTexperiment
Christopher Snowhill 2022-01-11 19:37:47 -08:00
parent f44e4e793b
commit 91c3feac2e
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,7 @@ tryagain:
size_t bitsPerSample = inputFormat.mBitsPerChannel;
if (bitsPerSample <= 8) {
samplesRead = bytesReadFromInput;
if (isUnsigned)
if (!isUnsigned)
convert_s8_to_s16(inputBuffer + bytesReadFromInput, inputBuffer, samplesRead);
else
convert_u8_to_s16(inputBuffer + bytesReadFromInput, inputBuffer, samplesRead);