aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-26 21:29:11 -0800
committerChris Robinson <[email protected]>2018-11-26 21:39:31 -0800
commitd8b9230ee4770095b0848aa38752e19d0090dd6a (patch)
tree054b0dc480947501b07b8fe44e21f4728e7c5adf /OpenAL32
parentb108d0acfd062756da69074242e24ea7b2856b8a (diff)
Use a standard mutex for the backend lock
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h2
-rw-r--r--OpenAL32/alAuxEffectSlot.cpp2
-rw-r--r--OpenAL32/alSource.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index d809406d..3643dd77 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -785,7 +785,7 @@ struct ALCdevice_struct {
// Contexts created on this device
std::atomic<ALCcontext*> ContextList{nullptr};
- almtx_t BackendLock;
+ std::mutex BackendLock;
ALCbackend *Backend{nullptr};
std::atomic<ALCdevice*> next{nullptr};
diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp
index cf39292b..43e99584 100644
--- a/OpenAL32/alAuxEffectSlot.cpp
+++ b/OpenAL32/alAuxEffectSlot.cpp
@@ -516,7 +516,7 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect
FPUCtl mixer_mode{};
ALCdevice *Device{Context->Device};
- std::unique_lock<almtx_t> backlock{Device->BackendLock};
+ std::unique_lock<std::mutex> backlock{Device->BackendLock};
State->mOutBuffer = Device->Dry.Buffer;
State->mOutChannels = Device->Dry.NumChannels;
if(State->deviceUpdate(Device) == AL_FALSE)
diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp
index 37805376..0515074c 100644
--- a/OpenAL32/alSource.cpp
+++ b/OpenAL32/alSource.cpp
@@ -1724,7 +1724,7 @@ ALboolean GetSourcedv(ALsource *Source, ALCcontext *Context, SourceProp prop, AL
* clock time with the device latency. Order is important.
*/
values[0] = GetSourceSecOffset(Source, Context, &srcclock);
- { std::lock_guard<almtx_t> _{device->BackendLock};
+ { std::lock_guard<std::mutex> _{device->BackendLock};
clocktime = GetClockLatency(device);
}
if(srcclock == clocktime.ClockTime)
@@ -1987,7 +1987,7 @@ ALboolean GetSourcei64v(ALsource *Source, ALCcontext *Context, SourceProp prop,
* clock time with the device latency. Order is important.
*/
values[0] = GetSourceSampleOffset(Source, Context, &srcclock);
- { std::lock_guard<almtx_t> _{device->BackendLock};
+ { std::lock_guard<std::mutex> _{device->BackendLock};
clocktime = GetClockLatency(device);
}
if(srcclock == clocktime.ClockTime)