From a349ef0f52267cf9cf9cfa8ead068ecf678637bc Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 12 Oct 2013 23:05:06 -0700 Subject: [PATCH] Might as well mutex here to be safe. --- Windows/DSoundStream.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Windows/DSoundStream.cpp b/Windows/DSoundStream.cpp index 72ad3ebfae..2329c227b6 100644 --- a/Windows/DSoundStream.cpp +++ b/Windows/DSoundStream.cpp @@ -195,6 +195,8 @@ namespace DSound if (!dsBuffer) return; + EnterCriticalSection(&soundCriticalSection); + if (threadData == 0) threadData = 1; @@ -217,6 +219,7 @@ namespace DSound if (soundSyncEvent != NULL) CloseHandle(soundSyncEvent); soundSyncEvent = NULL; + LeaveCriticalSection(&soundCriticalSection); }