Skip to content

Commit

Permalink
SPU2: Pass reverb input by value
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziemas authored and refractionpcsx2 committed Oct 19, 2023
1 parent 6764028 commit d920fe6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pcsx2/SPU2/Reverb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ __forceinline s32 V_Core::RevbGetIndexer(s32 offset)
return x & 0xf'ffff;
}

StereoOut32 V_Core::DoReverb(const StereoOut32& Input)
StereoOut32 V_Core::DoReverb(StereoOut32 Input)
{
if (EffectsStartA >= EffectsEndA)
{
return StereoOut32::Empty;
}

auto input = clamp_mix(Input);
Input = clamp_mix(Input);

RevbDownBuf[0][RevbSampleBufPos] = input.Left;
RevbDownBuf[1][RevbSampleBufPos] = input.Right;
RevbDownBuf[0][RevbSampleBufPos | 64] = input.Left;
RevbDownBuf[1][RevbSampleBufPos | 64] = input.Right;
RevbDownBuf[0][RevbSampleBufPos] = Input.Left;
RevbDownBuf[1][RevbSampleBufPos] = Input.Right;
RevbDownBuf[0][RevbSampleBufPos | 64] = Input.Left;
RevbDownBuf[1][RevbSampleBufPos | 64] = Input.Right;

bool R = Cycles & 1;

Expand Down
2 changes: 1 addition & 1 deletion pcsx2/SPU2/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ struct V_Core
// --------------------------------------------------------------------------------------

StereoOut32 Mix(const VoiceMixSet& inVoices, const StereoOut32& Input, const StereoOut32& Ext);
StereoOut32 DoReverb(const StereoOut32& Input);
StereoOut32 DoReverb(StereoOut32 Input);
s32 RevbGetIndexer(s32 offset);

StereoOut32 ReadInput();
Expand Down

0 comments on commit d920fe6

Please sign in to comment.