diff --git a/plugins/spu2-x/src/SndOut.cpp b/plugins/spu2-x/src/SndOut.cpp index bd31bb7493..c202bd18be 100644 --- a/plugins/spu2-x/src/SndOut.cpp +++ b/plugins/spu2-x/src/SndOut.cpp @@ -264,7 +264,7 @@ void SndBuffer::Init() m_underrun_freeze = false; sndTempBuffer = new StereoOut32[SndOutPacketSize]; - sndTempBuffer16 = new StereoOut16[SndOutPacketSize]; + sndTempBuffer16 = new StereoOut16[SndOutPacketSize * 2]; // in case of leftovers. } catch( std::bad_alloc& ) { @@ -340,11 +340,12 @@ void SndBuffer::Write( const StereoOut32& Sample ) { // Convert in, send to winamp DSP, and convert out. - for( int i=0; i= SndOutPacketSize ) { for( int i=0; i 0 ) { - memcpy( &sndTempBuffer16[ei], sndTempBuffer16, + memcpy( sndTempBuffer16, &sndTempBuffer16[ei], sizeof(sndTempBuffer16[0]) * m_dsp_progress ); }