diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alc.cpp | 2 | ||||
-rw-r--r-- | Alc/alcontext.h | 4 |
2 files changed, 3 insertions, 3 deletions
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 <mutex> +#include <atomic> #include <memory> #include <thread> @@ -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}; |