diff options
author | Chris Robinson <[email protected]> | 2019-02-04 21:28:37 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-02-04 21:28:37 -0800 |
commit | 05cdc2cb3002e0c9a20764a1e4e6a0e4de5e809e (patch) | |
tree | b280b918efe07576d856be9ef154bdf4a46f4023 /OpenAL32 | |
parent | e104f580b3170d643e0e2974bdad17c4d6609b28 (diff) |
Use relaxed memory ordering for initializing atomic_flags
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alAuxEffectSlot.h | 2 | ||||
-rw-r--r-- | OpenAL32/Include/alListener.h | 2 | ||||
-rw-r--r-- | OpenAL32/alSource.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index 61865397..de9e14a4 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -113,7 +113,7 @@ struct ALeffectslot { */ alignas(16) ALfloat WetBuffer[MAX_EFFECT_CHANNELS][BUFFERSIZE]; - ALeffectslot() { PropsClean.test_and_set(); } + ALeffectslot() { PropsClean.test_and_set(std::memory_order_relaxed); } ALeffectslot(const ALeffectslot&) = delete; ALeffectslot& operator=(const ALeffectslot&) = delete; ~ALeffectslot(); diff --git a/OpenAL32/Include/alListener.h b/OpenAL32/Include/alListener.h index 7b5b8b20..4d59dbf9 100644 --- a/OpenAL32/Include/alListener.h +++ b/OpenAL32/Include/alListener.h @@ -51,7 +51,7 @@ struct ALlistener { DistanceModel mDistanceModel; } Params; - ALlistener() { PropsClean.test_and_set(); } + ALlistener() { PropsClean.test_and_set(std::memory_order_relaxed); } }; void UpdateListenerProps(ALCcontext *context); diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp index cc384478..7a711bfb 100644 --- a/OpenAL32/alSource.cpp +++ b/OpenAL32/alSource.cpp @@ -3352,9 +3352,9 @@ ALsource::ALsource(ALsizei num_sends) queue = nullptr; - VoiceIdx = -1; + PropsClean.test_and_set(std::memory_order_relaxed); - PropsClean.test_and_set(); + VoiceIdx = -1; } ALsource::~ALsource() |