From c9eac0e10cfc880e5a16367b3bd886b6b37338d0 Mon Sep 17 00:00:00 2001 From: Peter Tissen Date: Sun, 3 Nov 2013 23:03:07 +0100 Subject: [PATCH] delete source of buffer overrun on Windows --- Core/PSPMixer.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Core/PSPMixer.cpp b/Core/PSPMixer.cpp index 69cec9f4c9..0aca963b98 100644 --- a/Core/PSPMixer.cpp +++ b/Core/PSPMixer.cpp @@ -28,11 +28,9 @@ int PSPMixer::Mix(short *stereoout, int numSamples) { int numFrames = __AudioMix(stereoout, numSamples); #ifdef _WIN32 - if (numFrames < numSamples) { - // Our dsound backend will not stop playing, let's just feed it zeroes if we miss data. - memset(stereoout + 2 * 2 * numFrames, 0, 2 * 2 * (numSamples - numFrames)); - numFrames = numSamples; - } + // Our dsound backend will not stop playing. + //__AudioMix fills the rest of the buffer with 0 already + numFrames = numSamples; #endif return numFrames; }