SPU2: Fix pitch modulation

This commit is contained in:
Ziemas 2021-01-24 04:23:36 +01:00 committed by refractionpcsx2
parent 34f665dc7e
commit ff0c9334e6
1 changed files with 1 additions and 12 deletions

View File

@ -581,18 +581,7 @@ static __forceinline StereoOut32 MixVoice(uint coreidx, uint voiceidx)
CalculateADSR(thiscore, voiceidx);
Value = MulShr32(Value, vc.ADSR.Value);
// Store Value for eventual modulation later
// Pseudonym's Crest calculation idea. Actually calculates a crest, unlike the old code which was just peak.
if (vc.PV1 < vc.NextCrest)
{
vc.OutX = MulShr32(vc.NextCrest, vc.ADSR.Value);
vc.NextCrest = -0x8000;
}
if (vc.PV1 > vc.PV2)
{
vc.NextCrest = vc.PV1;
}
vc.OutX = Value;
if (IsDevBuild)
DebugCores[coreidx].Voices[voiceidx].displayPeak = std::max(DebugCores[coreidx].Voices[voiceidx].displayPeak, (s32)vc.OutX);