This commit is contained in:
V10lator 2020-07-15 21:19:34 +02:00 committed by GitHub
commit bea847f02e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,12 +186,15 @@ void SoundDecoder::Decode() {
}
//! TODO: remove this later and add STEREO support with two voices, for now we convert to MONO
done >>= 1;
if(IsStereo()) {
int16_t* monoBuf = (int16_t*)write_buf;
done = done >> 1;
done >>= 1;
for(int32_t i = 0; i < done; i++)
monoBuf[i] = monoBuf[i << 1];
done <<= 1;
}
DCFlushRange(write_buf, done);