aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alError.cpp2
-rw-r--r--OpenAL32/alState.cpp4
-rw-r--r--OpenAL32/event.cpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/OpenAL32/alError.cpp b/OpenAL32/alError.cpp
index 16c89273..39c666d2 100644
--- a/OpenAL32/alError.cpp
+++ b/OpenAL32/alError.cpp
@@ -73,7 +73,7 @@ void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...)
context->LastError.compare_exchange_strong(curerr, errorCode);
if((context->EnabledEvts.load(std::memory_order_relaxed)&EventType_Error))
{
- std::lock_guard<almtx_t> _{context->EventCbLock};
+ std::lock_guard<std::mutex> _{context->EventCbLock};
ALbitfieldSOFT enabledevts{context->EnabledEvts.load(std::memory_order_relaxed)};
if((enabledevts&EventType_Error) && context->EventCb)
(*context->EventCb)(AL_EVENT_TYPE_ERROR_SOFT, 0, errorCode, msglen, msg,
diff --git a/OpenAL32/alState.cpp b/OpenAL32/alState.cpp
index 2901baa2..95a4fd92 100644
--- a/OpenAL32/alState.cpp
+++ b/OpenAL32/alState.cpp
@@ -664,8 +664,8 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value)
static constexpr ALCchar msg[] =
"alDopplerVelocity is deprecated in AL1.1, use alSpeedOfSound";
const ALsizei msglen = (ALsizei)strlen(msg);
- std::lock_guard<almtx_t> _{context->EventCbLock};
- ALbitfieldSOFT enabledevts{ATOMIC_LOAD(&context->EnabledEvts, almemory_order_relaxed)};
+ std::lock_guard<std::mutex> _{context->EventCbLock};
+ ALbitfieldSOFT enabledevts{context->EnabledEvts.load(std::memory_order_relaxed)};
if((enabledevts&EventType_Deprecated) && context->EventCb)
(*context->EventCb)(AL_EVENT_TYPE_DEPRECATED_SOFT, 0, 0, msglen, msg,
context->EventParam);
diff --git a/OpenAL32/event.cpp b/OpenAL32/event.cpp
index d6fa01fb..a2c98928 100644
--- a/OpenAL32/event.cpp
+++ b/OpenAL32/event.cpp
@@ -27,7 +27,7 @@ static int EventThread(ALCcontext *context)
continue;
}
- std::lock_guard<almtx_t> _{context->EventCbLock};
+ std::lock_guard<std::mutex> _{context->EventCbLock};
do {
quitnow = evt.EnumType == EventType_KillThread;
if(UNLIKELY(quitnow)) break;
@@ -126,7 +126,7 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A
/* Wait to ensure the event handler sees the changed flags before
* returning.
*/
- std::lock_guard<almtx_t>{context->EventCbLock};
+ std::lock_guard<std::mutex>{context->EventCbLock};
}
}
@@ -136,7 +136,7 @@ AL_API void AL_APIENTRY alEventCallbackSOFT(ALEVENTPROCSOFT callback, void *user
if(UNLIKELY(!context)) return;
std::lock_guard<almtx_t> _{context->PropLock};
- std::lock_guard<almtx_t> __{context->EventCbLock};
+ std::lock_guard<std::mutex> __{context->EventCbLock};
context->EventCb = callback;
context->EventParam = userParam;
}