diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2017-09-18 03:33:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-18 03:33:51 +0200 |
| commit | c50848be21bd0fd85f88548bca4f5ba7ab2e6924 (patch) | |
| tree | 3d6051c44eea4e706821356ea70ec8bcc456eb03 /Source | |
| parent | 755253948b134fb253903c2def1ab0f15107a8e5 (diff) | |
| parent | 3f481a70beedf67c2045b297670e63e9a6b6bcb9 (diff) | |
Merge pull request #6073 from dolphin-emu/delroth-fix-6069
Fix sample wrapping with new DSP ADPCM decoding
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/DSP/DSPAccelerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Core/DSP/DSPAccelerator.cpp b/Source/Core/Core/DSP/DSPAccelerator.cpp index 850f210b3f..1a8cbf2671 100644 --- a/Source/Core/Core/DSP/DSPAccelerator.cpp +++ b/Source/Core/Core/DSP/DSPAccelerator.cpp @@ -120,8 +120,8 @@ u16 ReadAccelerator(u32 start_address, u32 end_address, u32* current_address, u1 if (temp >= 8) temp -= 16; - val = (scale * temp) + ((0x400 + coef1 * *yn1 + coef2 * *yn2) >> 11); - val = MathUtil::Clamp<s16>(val, -0x7FFF, 0x7FFF); + s32 val32 = (scale * temp) + ((0x400 + coef1 * *yn1 + coef2 * *yn2) >> 11); + val = static_cast<s16>(MathUtil::Clamp<s32>(val32, -0x7FFF, 0x7FFF)); *yn2 = *yn1; *yn1 = val; |
