SPU2: Clamp before Applying master volume

ApplyVolume needs both its arguments to be within 16bit range.

[SAVEVERSION+]
This commit is contained in:
Ziemas 2023-10-18 14:47:28 +02:00 committed by refractionpcsx2
parent a90695ef1f
commit 7cc6f635fc
2 changed files with 3 additions and 4 deletions

View File

@ -633,7 +633,7 @@ __forceinline
Ext = StereoOut32::Empty;
else
{
Ext = clamp_mix(ApplyVolume(Ext, Cores[0].MasterVol));
Ext = ApplyVolume(clamp_mix(Ext), Cores[0].MasterVol);
}
// Commit Core 0 output to ram before mixing Core 1:
@ -657,8 +657,7 @@ __forceinline
}
else
{
Out.Left = ApplyVolume(Out.Left, Cores[1].MasterVol.Left.Value);
Out.Right = ApplyVolume(Out.Right, Cores[1].MasterVol.Right.Value);
Out = ApplyVolume(clamp_mix(Out), Cores[1].MasterVol);
}
// For a long time PCSX2 has had its output volume halved by

View File

@ -37,7 +37,7 @@ enum class FreezeAction
// [SAVEVERSION+]
// This informs the auto updater that the users savestates will be invalidated.
static const u32 g_SaveVersion = (0x9A46 << 16) | 0x0000;
static const u32 g_SaveVersion = (0x9A47 << 16) | 0x0000;
// the freezing data between submodules and core