diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index 3b7c885812..c3b9182985 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -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; } diff --git a/Windows/DSoundStream.cpp b/Windows/DSoundStream.cpp index bcc1125cb1..f82b735ea5 100644 --- a/Windows/DSoundStream.cpp +++ b/Windows/DSoundStream.cpp @@ -133,7 +133,8 @@ namespace DSound { int numBytesRendered = 4 * (*callback)(realtimeBuffer,numBytesToRender>>2,16,44100,2); - writeDataToBuffer(lastPos,(char *)realtimeBuffer,numBytesRendered); + if (numBytesRendered != 0) + writeDataToBuffer(lastPos,(char *)realtimeBuffer,numBytesRendered); currentPos = ModBufferSize(lastPos + numBytesRendered); totalRenderedBytes += numBytesRendered;