diff options
Diffstat (limited to 'OpenAL32/alListener.cpp')
-rw-r--r-- | OpenAL32/alListener.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alListener.cpp b/OpenAL32/alListener.cpp index 574f897c..bf1ac3f9 100644 --- a/OpenAL32/alListener.cpp +++ b/OpenAL32/alListener.cpp @@ -461,16 +461,16 @@ void UpdateListenerProps(ALCcontext *context) struct ALlistenerProps *props; /* Get an unused proprty container, or allocate a new one as needed. */ - props = ATOMIC_LOAD(&context->FreeListenerProps, almemory_order_acquire); + props = context->FreeListenerProps.load(std::memory_order_acquire); if(!props) props = static_cast<ALlistenerProps*>(al_calloc(16, sizeof(*props))); else { struct ALlistenerProps *next; do { - next = ATOMIC_LOAD(&props->next, almemory_order_relaxed); - } while(ATOMIC_COMPARE_EXCHANGE_WEAK(&context->FreeListenerProps, &props, next, - almemory_order_seq_cst, almemory_order_acquire) == 0); + next = props->next.load(std::memory_order_relaxed); + } while(context->FreeListenerProps.compare_exchange_weak(props, next, + std::memory_order_seq_cst, std::memory_order_acquire) == 0); } /* Copy in current property values. */ @@ -492,7 +492,7 @@ void UpdateListenerProps(ALCcontext *context) props->Gain = listener->Gain; /* Set the new container for updating internal parameters. */ - props = ATOMIC_EXCHANGE(&listener->Update, props, almemory_order_acq_rel); + props = listener->Update.exchange(props, std::memory_order_acq_rel); if(props) { /* If there was an unused update container, put it back in the |