From a90695ef1fed9451ddaba07374abdbf1710157bd Mon Sep 17 00:00:00 2001 From: Ziemas Date: Wed, 18 Oct 2023 14:45:29 +0200 Subject: [PATCH] SPU2: Make mixer gates s32 for safety Don't wanna accidentally truncate --- pcsx2/SPU2/defs.h | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/pcsx2/SPU2/defs.h b/pcsx2/SPU2/defs.h index 19fccf5424eba..0e06a70826fc9 100644 --- a/pcsx2/SPU2/defs.h +++ b/pcsx2/SPU2/defs.h @@ -350,28 +350,20 @@ struct V_CoreRegs struct V_VoiceGates { - s16 DryL; // 'AND Gate' for Direct Output to Left Channel - s16 DryR; // 'AND Gate' for Direct Output for Right Channel - s16 WetL; // 'AND Gate' for Effect Output for Left Channel - s16 WetR; // 'AND Gate' for Effect Output for Right Channel + s32 DryL; // 'AND Gate' for Direct Output to Left Channel + s32 DryR; // 'AND Gate' for Direct Output for Right Channel + s32 WetL; // 'AND Gate' for Effect Output for Left Channel + s32 WetR; // 'AND Gate' for Effect Output for Right Channel }; struct V_CoreGates { - union - { - u128 v128; - - struct - { - s16 InpL; // Sound Data Input to Direct Output (Left) - s16 InpR; // Sound Data Input to Direct Output (Right) - s16 SndL; // Voice Data to Direct Output (Left) - s16 SndR; // Voice Data to Direct Output (Right) - s16 ExtL; // External Input to Direct Output (Left) - s16 ExtR; // External Input to Direct Output (Right) - }; - }; + s32 InpL; // Sound Data Input to Direct Output (Left) + s32 InpR; // Sound Data Input to Direct Output (Right) + s32 SndL; // Voice Data to Direct Output (Left) + s32 SndR; // Voice Data to Direct Output (Right) + s32 ExtL; // External Input to Direct Output (Left) + s32 ExtR; // External Input to Direct Output (Right) }; struct VoiceMixSet