From 4fc93dded43ff771fcda353647d4f23868a353f6 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Mon, 2 Nov 2009 21:07:22 +0000 Subject: [PATCH] SPU2-X: Minor fix for very rare cases of hang-on-suspend when using the XA2 driver. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2120 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp b/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp index 36b8af28a6..7f270d0e7b 100644 --- a/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp +++ b/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp @@ -181,8 +181,9 @@ private: IXAudio2SourceVoice* killMe = pSourceVoice; pSourceVoice = NULL; killMe->FlushSourceBuffers(); - EnterCriticalSection( &cs ); killMe->DestroyVoice(); + + EnterCriticalSection( &cs ); safe_delete_array( qbuffer ); LeaveCriticalSection( &cs ); DeleteCriticalSection( &cs );