From 294705aea6810d9b014ce78fd87228eb1a4ab4ba Mon Sep 17 00:00:00 2001 From: gigaherz Date: Sun, 28 Mar 2010 21:27:53 +0000 Subject: [PATCH] Build on the preivous dsp fix so that it can work with dsp plugins that return partial blocks. It's not tested properly since I don't know of any plugin which does that. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2789 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/SndOut.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 ); }