From c837484015e186076165515882beec389f02a987 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 27 May 2016 19:23:39 -0700 Subject: Use a specific lock for the backend's stop/reset/play calls This helps protect against the device changing unexpectedly from multiple threads, instead of using the global list/library lock. --- OpenAL32/Include/alMain.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index f709e9bd..50162b0e 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -37,6 +37,7 @@ #include "vector.h" #include "alstring.h" #include "almalloc.h" +#include "threads.h" #include "hrtf.h" @@ -644,6 +645,7 @@ struct ALCdevice_struct // Contexts created on this device ATOMIC(ALCcontext*) ContextList; + almtx_t BackendLock; struct ALCbackend *Backend; void *ExtraData; // For the backend's use -- cgit v1.2.3