From 8b0cbe445a9e229f5bdcab8f91c5631cdf461993 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Mon, 12 Oct 2009 19:55:54 +0000 Subject: [PATCH] SPU2-X: Minor bugfix to suspend/shutdown code which caused SPU2-X to hang in very rare occasions. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1999 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp b/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp index 5d4afb7711..36b8af28a6 100644 --- a/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp +++ b/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp @@ -209,7 +209,11 @@ private: EnterCriticalSection( &cs ); // All of these checks are necessary because XAudio2 is wonky shizat. - if( pSourceVoice == NULL || context == NULL ) return; + if( pSourceVoice == NULL || context == NULL ) + { + LeaveCriticalSection( &cs ); + return; + } T* qb = (T*)context;