aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index fa7b9f44..28c9bc6f 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2263,7 +2263,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
}
almtx_lock(&context->PropLock);
- almtx_lock(&context->EffectSlotLock);
+ std::unique_lock<almtx_t> slotlock{context->EffectSlotLock};
for(auto &slot : context->EffectSlotList)
{
EffectState *state = slot->Effect.State;
@@ -2275,7 +2275,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
else
UpdateEffectSlotProps(slot.get(), context);
}
- almtx_unlock(&context->EffectSlotLock);
+ slotlock.unlock();
almtx_lock(&context->SourceLock);
for(auto &sublist : context->SourceList)