A few more adjustments.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2839 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2010-04-12 18:38:29 +00:00
parent bb80927cc3
commit d6c2ba9a44
2 changed files with 7 additions and 5 deletions

View File

@ -127,7 +127,7 @@ bool SndBuffer::CheckUnderrunStatus( int& nSamples, int& quietSampleCount )
quietSampleCount = 0; quietSampleCount = 0;
if( m_underrun_freeze ) if( m_underrun_freeze )
{ {
int toFill = m_size / (timeStretchDisabled || asyncMixingEnabled ? 32 : 400); int toFill = m_size / (timeStretchDisabled && !asyncMixingEnabled ? 32 : 400);
toFill = GetAlignedBufferSize( toFill ); toFill = GetAlignedBufferSize( toFill );
// toFill is now aligned to a SndOutPacket // toFill is now aligned to a SndOutPacket

View File

@ -123,7 +123,7 @@ void SndBuffer::UpdateTempoChangeSoundTouch()
if( cTempo < 0.965f || cTempo > 1.060f || if( cTempo < 0.965f || cTempo > 1.060f ||
pctChange < -0.38f || pctChange > 0.54f || pctChange < -0.38f || pctChange > 0.54f ||
statusPct < -0.42f || statusPct > 0.49f || statusPct < -0.42f || statusPct > 0.70f ||
eTempo < 0.89f || eTempo > 1.19f ) eTempo < 0.89f || eTempo > 1.19f )
{ {
//printf("Emergency stretch: cTempo = %f eTempo = %f pctChange = %f statusPct = %f\n",cTempo,eTempo,pctChange,statusPct); //printf("Emergency stretch: cTempo = %f eTempo = %f pctChange = %f statusPct = %f\n",cTempo,eTempo,pctChange,statusPct);
@ -208,13 +208,15 @@ void SndBuffer::UpdateTempoChangeAsyncMixing()
lastPct = statusPct; lastPct = statusPct;
if( statusPct < -0.4f ) if( statusPct < -0.4f )
{ {
TickInterval -= 2; TickInterval -= 4;
if( TickInterval <= 200 ) TickInterval = 200; if( TickInterval <= 200 ) TickInterval = 200;
//printf("-- %d, %f\n",TickInterval,statusPct);
} }
else if( statusPct > 0.4f ) else if( statusPct > 0.5f )
{ {
TickInterval += 10; TickInterval += 1;
if( TickInterval >= 7000 ) TickInterval = 7000; if( TickInterval >= 7000 ) TickInterval = 7000;
//printf("++ %d, %f\n",TickInterval,statusPct);
} }
else TickInterval = 768; else TickInterval = 768;
} }