CDROM: Fix incorrect clmap in XA-ADPCM decoding

Fixes crunchy audio in GT2: A-Spec.
This commit is contained in:
Stenzek 2024-11-25 01:05:06 +10:00
parent 9fa8fee193
commit 40a1bee9ea
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -3460,7 +3460,7 @@ void CDROM::DecodeXAADPCMChunks(const u8* chunk_ptr, s16* samples)
// mix in previous values
s32* prev = IS_STEREO ? &s_state.xa_last_samples[(block & 1) * 2] : &s_state.xa_last_samples[0];
const s32 interp_sample = std::clamp<s32>(
static_cast<s32>(sample) + ((prev[0] * filter_pos) >> 6) + ((prev[1] * filter_neg) >> 6), -32767, 32768);
static_cast<s32>(sample) + ((prev[0] * filter_pos) >> 6) + ((prev[1] * filter_neg) >> 6), -32768, 32767);
// update previous values
prev[1] = prev[0];