From 1468b21ca007cbde182011e97be9f9073cfe996d Mon Sep 17 00:00:00 2001 From: "sudonim1@gmail.com" Date: Sat, 10 Nov 2012 18:10:34 +0000 Subject: [PATCH] SPU2-X: Disabled the parked voice processing optimisation completely for now. Fixes Silent Hill: Shattered Memories, maybe others. Reduces speed for all games. However much you hate this change, I hate it more. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5446 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/Mixer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/spu2-x/src/Mixer.cpp b/plugins/spu2-x/src/Mixer.cpp index 81cfa9569d..94fe70db34 100644 --- a/plugins/spu2-x/src/Mixer.cpp +++ b/plugins/spu2-x/src/Mixer.cpp @@ -17,6 +17,11 @@ #include "Global.h" +// Games have turned out to be surprisingly sensitive to whether a parked, silent voice is being fully emulated. +// With Silent Hill: Shattered Memories requiring full processing for no obvious reason, we've decided to +// disable the optimisation until we can tie it to the game database. +#define NEVER_SKIP_VOICES 1 + void ADMAOutLogWrite(void *lpData, u32 ulSize); static const s32 tbl_XA_Factor[16][2] = @@ -612,7 +617,8 @@ static __forceinline StereoOut32 MixVoice( uint coreidx, uint voiceidx ) else { // Continue processing voice, even if it's "off". Or else we miss interrupts! (Fatal Frame engine died because of this.) - if ((*GetMemPtr(vc.NextA & 0xFFFF8) >> 8 & 3) != 3 || vc.LoopStartA != (vc.NextA & ~7) // not in a tight loop + if (NEVER_SKIP_VOICES + || (*GetMemPtr(vc.NextA & 0xFFFF8) >> 8 & 3) != 3 || vc.LoopStartA != (vc.NextA & ~7) // not in a tight loop || Cores[0].IRQEnable && (Cores[0].IRQA & ~7) == vc.LoopStartA // or should be interrupting regularly || Cores[1].IRQEnable && (Cores[1].IRQA & ~7) == vc.LoopStartA || !(thiscore.Regs.ENDX & 1 << voiceidx)) // or isn't currently flagged as having passed the endpoint