diff options
author | Chris Robinson <[email protected]> | 2018-11-26 22:06:53 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-26 22:06:53 -0800 |
commit | 2d45ec8dc360cbdf9f813db0b8286d8e11a432d9 (patch) | |
tree | 4a76d5bada32a13772e70e24ed89b30ce9af6811 /OpenAL32/alSource.cpp | |
parent | 68eef6abb4f48262ec4d514fb3c77b8d4e9c0bf7 (diff) |
Use a standard mutex for the remaining locks
Diffstat (limited to 'OpenAL32/alSource.cpp')
-rw-r--r-- | OpenAL32/alSource.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp index 2370487f..7cba253a 100644 --- a/OpenAL32/alSource.cpp +++ b/OpenAL32/alSource.cpp @@ -1208,8 +1208,8 @@ ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, co ALeffectslot *slot{nullptr}; ALbufferlistitem *oldlist{nullptr}; std::unique_lock<std::mutex> slotlock; - std::unique_lock<almtx_t> filtlock; - std::unique_lock<almtx_t> buflock; + std::unique_lock<std::mutex> filtlock; + std::unique_lock<std::mutex> buflock; ALfloat fvals[6]; switch(prop) @@ -1254,7 +1254,7 @@ ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, co return AL_TRUE; case AL_BUFFER: - buflock = std::unique_lock<almtx_t>{device->BufferLock}; + buflock = std::unique_lock<std::mutex>{device->BufferLock}; if(!(*values == 0 || (buffer=LookupBuffer(device, *values)) != nullptr)) SETERR_RETURN(Context, AL_INVALID_VALUE, AL_FALSE, "Invalid buffer ID %u", *values); @@ -1336,7 +1336,7 @@ ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, co return AL_TRUE; case AL_DIRECT_FILTER: - filtlock = std::unique_lock<almtx_t>{device->FilterLock}; + filtlock = std::unique_lock<std::mutex>{device->FilterLock}; if(!(*values == 0 || (filter=LookupFilter(device, *values)) != nullptr)) SETERR_RETURN(Context, AL_INVALID_VALUE, AL_FALSE, "Invalid filter ID %u", *values); @@ -1426,7 +1426,7 @@ ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, co if((ALuint)values[1] >= (ALuint)device->NumAuxSends) SETERR_RETURN(Context, AL_INVALID_VALUE, AL_FALSE, "Invalid send %u", values[1]); - filtlock = std::unique_lock<almtx_t>{device->FilterLock}; + filtlock = std::unique_lock<std::mutex>{device->FilterLock}; if(!(values[2] == 0 || (filter=LookupFilter(device, values[2])) != nullptr)) SETERR_RETURN(Context, AL_INVALID_VALUE, AL_FALSE, "Invalid filter ID %u", values[2]); @@ -3004,7 +3004,7 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint src, ALsizei nb, const ALu BufferList = BufferList->next.load(std::memory_order_relaxed); } - std::unique_lock<almtx_t> buflock{device->BufferLock}; + std::unique_lock<std::mutex> buflock{device->BufferLock}; ALbufferlistitem *BufferListStart{nullptr}; BufferList = nullptr; for(ALsizei i{0};i < nb;i++) @@ -3121,7 +3121,7 @@ AL_API void AL_APIENTRY alSourceQueueBufferLayersSOFT(ALuint src, ALsizei nb, co BufferList = BufferList->next.load(std::memory_order_relaxed); } - std::unique_lock<almtx_t> buflock{device->BufferLock}; + std::unique_lock<std::mutex> buflock{device->BufferLock}; auto BufferListStart = static_cast<ALbufferlistitem*>(al_calloc(DEF_ALIGN, FAM_SIZE(ALbufferlistitem, buffers, nb))); BufferList = BufferListStart; |