mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 12:55:47 -04:00
SPU: Clamp before applying main volume not after
Fixes popping in Monkey Magic.
This commit is contained in:
@ -331,9 +331,9 @@ private:
|
||||
};
|
||||
};
|
||||
|
||||
static constexpr s16 Clamp16(s32 value)
|
||||
static constexpr s32 Clamp16(s32 value)
|
||||
{
|
||||
return (value < -0x8000) ? -0x8000 : (value > 0x7FFF) ? 0x7FFF : static_cast<s16>(value);
|
||||
return (value < -0x8000) ? -0x8000 : (value > 0x7FFF) ? 0x7FFF : value;
|
||||
}
|
||||
|
||||
static constexpr s32 ApplyVolume(s32 sample, s16 volume) { return (sample * s32(volume)) >> 15; }
|
||||
|
Reference in New Issue
Block a user