Skip to content

Commit

Permalink
SPU2: Make mixer gates s32 for safety
Browse files Browse the repository at this point in the history
Don't wanna accidentally truncate
  • Loading branch information
Ziemas authored and refractionpcsx2 committed Oct 18, 2023
1 parent 0e99c9b commit a90695e
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions pcsx2/SPU2/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a90695e

Please sign in to comment.