aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-01 00:24:49 -0700
committerChris Robinson <[email protected]>2019-09-01 00:29:26 -0700
commitaee10ef60623e012e5edc6fcf31b2d71b2086bc9 (patch)
treee6e919d20cb05b51a86b4dc64fa7dd2b8a7a7969 /al
parenta15f25b07ad442890bb9a75a7ef7f43cf5ab2ef4 (diff)
Hold the source lock in UpdateAllSourceProps
Diffstat (limited to 'al')
-rw-r--r--al/source.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/al/source.cpp b/al/source.cpp
index d9a7cb87..08e4bff6 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -3318,6 +3318,7 @@ ALsource::~ALsource()
void UpdateAllSourceProps(ALCcontext *context)
{
+ std::lock_guard<std::mutex> _{context->mSourceLock};
auto voices_end = context->mVoices->begin() +
context->mVoiceCount.load(std::memory_order_relaxed);
std::for_each(context->mVoices->begin(), voices_end,