aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alAuxEffectSlot.cpp2
-rw-r--r--OpenAL32/alBuffer.cpp12
-rw-r--r--OpenAL32/alState.cpp2
-rw-r--r--OpenAL32/event.cpp2
4 files changed, 9 insertions, 9 deletions
diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp
index e7991ff0..cf39292b 100644
--- a/OpenAL32/alAuxEffectSlot.cpp
+++ b/OpenAL32/alAuxEffectSlot.cpp
@@ -552,7 +552,7 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect
if(props->State)
props->State->DecRef();
props->State = nullptr;
- props = ATOMIC_LOAD(&props->next, almemory_order_relaxed);
+ props = props->next.load(std::memory_order_relaxed);
}
return AL_NO_ERROR;
diff --git a/OpenAL32/alBuffer.cpp b/OpenAL32/alBuffer.cpp
index 3716ac28..1b50f075 100644
--- a/OpenAL32/alBuffer.cpp
+++ b/OpenAL32/alBuffer.cpp
@@ -235,7 +235,7 @@ void LoadData(ALCcontext *context, ALbuffer *ALBuf, ALuint freq, ALsizei size, U
NameFromUserFmtType(SrcType));
}
- ALsizei unpackalign{ATOMIC_LOAD_SEQ(&ALBuf->UnpackAlign)};
+ ALsizei unpackalign{ALBuf->UnpackAlign.load()};
ALsizei align{SanitizeAlignment(SrcType, unpackalign)};
if(UNLIKELY(align < 1))
SETERR_RETURN(context, AL_INVALID_VALUE,, "Invalid unpack alignment %d for %s samples",
@@ -682,7 +682,7 @@ AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer, ALenum format, cons
return;
}
- ALsizei unpack_align{ATOMIC_LOAD_SEQ(&albuf->UnpackAlign)};
+ ALsizei unpack_align{albuf->UnpackAlign.load()};
ALsizei align{SanitizeAlignment(srctype, unpack_align)};
if(UNLIKELY(align < 1))
alSetError(context.get(), AL_INVALID_VALUE, "Invalid unpack alignment %d", unpack_align);
@@ -854,14 +854,14 @@ AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value)
if(UNLIKELY(value < 0))
alSetError(context.get(), AL_INVALID_VALUE, "Invalid unpack block alignment %d", value);
else
- ATOMIC_STORE_SEQ(&albuf->UnpackAlign, value);
+ albuf->UnpackAlign.store(value);
break;
case AL_PACK_BLOCK_ALIGNMENT_SOFT:
if(UNLIKELY(value < 0))
alSetError(context.get(), AL_INVALID_VALUE, "Invalid pack block alignment %d", value);
else
- ATOMIC_STORE_SEQ(&albuf->PackAlign, value);
+ albuf->PackAlign.store(value);
break;
default:
@@ -1036,11 +1036,11 @@ AL_API ALvoid AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value
break;
case AL_UNPACK_BLOCK_ALIGNMENT_SOFT:
- *value = ATOMIC_LOAD_SEQ(&albuf->UnpackAlign);
+ *value = albuf->UnpackAlign.load();
break;
case AL_PACK_BLOCK_ALIGNMENT_SOFT:
- *value = ATOMIC_LOAD_SEQ(&albuf->PackAlign);
+ *value = albuf->PackAlign.load();
break;
default:
diff --git a/OpenAL32/alState.cpp b/OpenAL32/alState.cpp
index 95a4fd92..e2cd96d6 100644
--- a/OpenAL32/alState.cpp
+++ b/OpenAL32/alState.cpp
@@ -659,7 +659,7 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value)
ContextRef context{GetContextRef()};
if(UNLIKELY(!context)) return;
- if((ATOMIC_LOAD(&context->EnabledEvts, almemory_order_relaxed)&EventType_Deprecated))
+ if((context->EnabledEvts.load(std::memory_order_relaxed)&EventType_Deprecated))
{
static constexpr ALCchar msg[] =
"alDopplerVelocity is deprecated in AL1.1, use alSpeedOfSound";
diff --git a/OpenAL32/event.cpp b/OpenAL32/event.cpp
index a2c98928..0491c7c6 100644
--- a/OpenAL32/event.cpp
+++ b/OpenAL32/event.cpp
@@ -38,7 +38,7 @@ static int EventThread(ALCcontext *context)
continue;
}
- ALbitfieldSOFT enabledevts{ATOMIC_LOAD(&context->EnabledEvts, almemory_order_acquire)};
+ ALbitfieldSOFT enabledevts{context->EnabledEvts.load(std::memory_order_acquire)};
if(context->EventCb && (enabledevts&evt.EnumType) == evt.EnumType)
context->EventCb(evt.u.user.type, evt.u.user.id, evt.u.user.param,
(ALsizei)strlen(evt.u.user.msg), evt.u.user.msg, context->EventParam