From f9e969a3391e1c0622e35ceaf5dc541b7f149c5d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 20 Nov 2018 10:55:57 -0800 Subject: Use a standard mutex for the event callback lock --- Alc/alc.cpp | 2 -- Alc/alcontext.h | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc') diff --git a/Alc/alc.cpp b/Alc/alc.cpp index 00148246..65e77b0d 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2539,7 +2539,6 @@ static ALvoid InitContext(ALCcontext *Context) Context->SpeedOfSound = SPEEDOFSOUNDMETRESPERSEC; Context->MetersPerUnit = AL_DEFAULT_METERS_PER_UNIT; alsem_init(&Context->EventSem, 0); - almtx_init(&Context->EventCbLock, almtx_plain); Context->ExtensionList = alExtList; @@ -2650,7 +2649,6 @@ ALCcontext_struct::~ALCcontext_struct() } TRACE("Freed " SZFMT " listener property object%s\n", count, (count==1)?"":"s"); - almtx_destroy(&EventCbLock); alsem_destroy(&EventSem); ll_ringbuffer_free(AsyncEvents); diff --git a/Alc/alcontext.h b/Alc/alcontext.h index ce715bc2..4a056597 100644 --- a/Alc/alcontext.h +++ b/Alc/alcontext.h @@ -1,6 +1,8 @@ #ifndef ALCONTEXT_H #define ALCONTEXT_H +#include +#include #include #include @@ -102,7 +104,7 @@ struct ALCcontext_struct { alsem_t EventSem; ll_ringbuffer *AsyncEvents{nullptr}; ATOMIC(ALbitfieldSOFT) EnabledEvts{0u}; - almtx_t EventCbLock; + std::mutex EventCbLock; ALEVENTPROCSOFT EventCb{}; void *EventParam{nullptr}; -- cgit v1.2.3