iOS: fix significant audio stutter.

This commit is contained in:
Unknown W. Brackets 2013-03-17 11:29:22 -07:00
parent f723abe68b
commit aca5e8e42f
2 changed files with 3 additions and 2 deletions

View File

@ -273,5 +273,5 @@ int __AudioMix(short *outstereo, int numFrames)
// DEBUG_LOG(HLE, "No underrun, mixed %i samples fine", numFrames);
}
section.unlock();
return numFrames;
return underrun >= 0 ? underrun : numFrames;
}

View File

@ -133,6 +133,7 @@ namespace DSound
{
int numBytesRendered = 4 * (*callback)(realtimeBuffer,numBytesToRender>>2,16,44100,2);
if (numBytesRendered != 0)
writeDataToBuffer(lastPos,(char *)realtimeBuffer,numBytesRendered);
currentPos = ModBufferSize(lastPos + numBytesRendered);