aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/alc.cpp7
-rw-r--r--Alc/alcontext.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index 485ab88e..d6331862 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -1616,7 +1616,7 @@ void ALCcontext_DeferUpdates(ALCcontext *context)
*/
void ALCcontext_ProcessUpdates(ALCcontext *context)
{
- std::lock_guard<almtx_t> _{context->PropLock};
+ std::lock_guard<std::mutex> _{context->PropLock};
if(context->DeferUpdates.exchange(false))
{
/* Tell the mixer to stop applying updates, then wait for any active
@@ -2260,7 +2260,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
UpdateEffectSlotProps(slot, context);
}
- std::unique_lock<almtx_t> proplock{context->PropLock};
+ std::unique_lock<std::mutex> proplock{context->PropLock};
std::unique_lock<almtx_t> slotlock{context->EffectSlotLock};
for(auto &slot : context->EffectSlotList)
{
@@ -2513,7 +2513,6 @@ static ALvoid InitContext(ALCcontext *Context)
struct ALeffectslotArray *auxslots;
//Validate Context
- almtx_init(&Context->PropLock, almtx_plain);
almtx_init(&Context->SourceLock, almtx_plain);
almtx_init(&Context->EffectSlotLock, almtx_plain);
@@ -2660,8 +2659,6 @@ ALCcontext_struct::~ALCcontext_struct()
ll_ringbuffer_free(AsyncEvents);
AsyncEvents = nullptr;
- almtx_destroy(&PropLock);
-
ALCdevice_DecRef(Device);
}
diff --git a/Alc/alcontext.h b/Alc/alcontext.h
index 056d9003..0b285bfb 100644
--- a/Alc/alcontext.h
+++ b/Alc/alcontext.h
@@ -84,7 +84,7 @@ struct ALCcontext_struct {
std::atomic_flag PropsClean{true};
std::atomic<bool> DeferUpdates{false};
- almtx_t PropLock;
+ std::mutex PropLock;
/* Counter for the pre-mixing updates, in 31.1 fixed point (lowest bit
* indicates if updates are currently happening).