diff --git a/plugins/spu2-x/src/SndOut_SDL.cpp b/plugins/spu2-x/src/SndOut_SDL.cpp index e29e6ef6f4..b37693090f 100644 --- a/plugins/spu2-x/src/SndOut_SDL.cpp +++ b/plugins/spu2-x/src/SndOut_SDL.cpp @@ -55,6 +55,9 @@ namespace { void callback_fillBuffer(void *userdata, Uint8 *stream, int len) { // Length should always be samples in bytes. assert(len / sizeof(StereoOut_SDL) == samples); +#if SDL_MAJOR_VERSION >= 2 + memset(stream, 0, len); +#endif for(Uint16 i = 0; i < samples; i += SndOutPacketSize) SndBuffer::ReadSamples(&buffer[i]);