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
This commit is contained in:
gigaherz 2008-11-12 14:18:41 +00:00 committed by Gregory Hainaut
parent a7db736e6b
commit dd7f8807ac
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}