aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alMain.h
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r--OpenAL32/Include/alMain.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index e23eb1fb..5e53a047 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -785,7 +785,11 @@ struct ALCdevice_struct {
// Contexts created on this device
std::atomic<ALCcontext*> ContextList{nullptr};
- std::mutex BackendLock;
+ /* This lock protects the device state (format, update size, etc) from
+ * being from being changed in multiple threads, or being accessed while
+ * being changed. It's also used to serialize calls to the backend.
+ */
+ std::mutex StateLock;
std::unique_ptr<BackendBase> Backend;
std::atomic<ALCdevice*> next{nullptr};