From dd7f8807acab216fa2302395332d7a67901d7f83 Mon Sep 17 00:00:00 2001 From: gigaherz Date: Wed, 12 Nov 2008 14:18:41 +0000 Subject: [PATCH] OMFG gigaherz is commiting something! RUN! So rama made me notice the "sanity" checks on the TimeUpdate stuff, I read it, and it kinda scared me that it happily dropped the sync as soon as the audio was 0.002 seconds out of sync! I changed it so the "sanity recovery" code only kicks in when there's over 0.1 seconds desync in clock numbers, which seems a LOT more reasonable. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@320 a6443dda-0b58-4228-96e9-037be469359c --- plugins/spu2ghz/spu2.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/spu2ghz/spu2.cpp b/plugins/spu2ghz/spu2.cpp index f904a79dd8..094e82a2cb 100644 --- a/plugins/spu2ghz/spu2.cpp +++ b/plugins/spu2ghz/spu2.cpp @@ -674,6 +674,7 @@ void UpdateDebugDialog() #endif #define TickInterval 768 +#define SanityInterval 4800 u32 TicksCore=0; u32 TicksThread=0; @@ -707,10 +708,10 @@ void __fastcall TimeUpdate(u32 cClocks, u32 syncType) // If for some reason our clock value seems way off base, just mix // out a little bit, skip the rest, and hope the ship "rights" itself later on. - if( dClocks > TickInterval*96 ) + if( dClocks > TickInterval*SanityInterval ) { ConLog( " * SPU2 > TimeUpdate Sanity Check (Tick Delta: %d) (PS2 Ticks: %d)\n", dClocks/TickInterval, cClocks/TickInterval ); - dClocks = TickInterval*96; + dClocks = TickInterval*SanityInterval; lClocks = cClocks-dClocks; }