Merge pull request #6073 from dolphin-emu/delroth-fix-6069
Fix sample wrapping with new DSP ADPCM decoding
This commit is contained in:
commit
c50848be21
|
@ -120,8 +120,8 @@ u16 ReadAccelerator(u32 start_address, u32 end_address, u32* current_address, u1
|
||||||
if (temp >= 8)
|
if (temp >= 8)
|
||||||
temp -= 16;
|
temp -= 16;
|
||||||
|
|
||||||
val = (scale * temp) + ((0x400 + coef1 * *yn1 + coef2 * *yn2) >> 11);
|
s32 val32 = (scale * temp) + ((0x400 + coef1 * *yn1 + coef2 * *yn2) >> 11);
|
||||||
val = MathUtil::Clamp<s16>(val, -0x7FFF, 0x7FFF);
|
val = static_cast<s16>(MathUtil::Clamp<s32>(val32, -0x7FFF, 0x7FFF));
|
||||||
|
|
||||||
*yn2 = *yn1;
|
*yn2 = *yn1;
|
||||||
*yn1 = val;
|
*yn1 = val;
|
||||||
|
|
Loading…
Reference in New Issue