Merge pull request #6073 from dolphin-emu/delroth-fix-6069

Fix sample wrapping with new DSP ADPCM decoding
This commit is contained in:
Pierre Bourdon 2017-09-18 03:33:51 +02:00 committed by GitHub
commit c50848be21
1 changed files with 2 additions and 2 deletions

View File

@ -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;