From cf9600fd9f873a0a36d2b9786fe4d3d88173b49f Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Mon, 28 Mar 2011 00:03:06 +0000 Subject: [PATCH] SPU2-X: Tweaks to async mixing, making the buffer stay closer to 50% filled and also making it more effective on sharp FPS drops. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4500 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/Timestretcher.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/spu2-x/src/Timestretcher.cpp b/plugins/spu2-x/src/Timestretcher.cpp index b36770a229..fc100bb9e7 100644 --- a/plugins/spu2-x/src/Timestretcher.cpp +++ b/plugins/spu2-x/src/Timestretcher.cpp @@ -204,13 +204,14 @@ void SndBuffer::UpdateTempoChangeAsyncMixing() float statusPct = GetStatusPct(); lastPct = statusPct; - if( statusPct < -0.4f ) + if( statusPct < -0.1f ) { TickInterval -= 4; - if( TickInterval <= 200 ) TickInterval = 200; + if( statusPct < -0.3f ) TickInterval = 64; + if( TickInterval < 64 ) TickInterval = 64; //printf("-- %d, %f\n",TickInterval,statusPct); } - else if( statusPct > 0.5f ) + else if( statusPct > 0.2f ) { TickInterval += 1; if( TickInterval >= 7000 ) TickInterval = 7000;