Skip to content

Commit

Permalink
CDROM: Fix incorrect clmap in XA-ADPCM decoding
Browse files Browse the repository at this point in the history
Fixes crunchy audio in GT2: A-Spec.
  • Loading branch information
stenzek committed Nov 24, 2024
1 parent 9fa8fee commit 40a1bee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/cdrom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 40a1bee

Please # to comment.