diff options
Diffstat (limited to 'alc')
-rw-r--r-- | alc/alc.cpp | 12 | ||||
-rw-r--r-- | alc/alcontext.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index a6a12811..267e5fef 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1557,9 +1557,9 @@ void ALCcontext::processUpdates() /* busy-wait */ } - if(!mPropsClean.test_and_set(std::memory_order_acq_rel)) + if(mPropsDirty.test_and_clear(std::memory_order_acq_rel)) UpdateContextProps(this); - if(!mListener.PropsClean.test_and_set(std::memory_order_acq_rel)) + if(mListener.mPropsDirty.test_and_clear(std::memory_order_acq_rel)) UpdateListenerProps(this); UpdateAllEffectSlotProps(this); UpdateAllSourceProps(this); @@ -2191,7 +2191,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) auto send_begin = source->Send.begin() + static_cast<ptrdiff_t>(num_sends); std::for_each(send_begin, source->Send.end(), clear_send); - source->PropsClean.clear(std::memory_order_release); + source->mPropsDirty.set(std::memory_order_release); } } @@ -2234,9 +2234,9 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList) } srclock.unlock(); - context->mPropsClean.test_and_set(std::memory_order_release); + context->mPropsDirty.test_and_clear(std::memory_order_release); UpdateContextProps(context); - context->mListener.PropsClean.test_and_set(std::memory_order_release); + context->mListener.mPropsDirty.test_and_clear(std::memory_order_release); UpdateListenerProps(context); UpdateAllSourceProps(context); } @@ -2348,7 +2348,7 @@ static DeviceRef VerifyDevice(ALCdevice *device) ALCcontext::ALCcontext(al::intrusive_ptr<ALCdevice> device) : mDevice{std::move(device)} { - mPropsClean.test_and_set(std::memory_order_relaxed); + mPropsDirty.test_and_clear(std::memory_order_relaxed); } ALCcontext::~ALCcontext() diff --git a/alc/alcontext.h b/alc/alcontext.h index b1ec0a6b..860b129b 100644 --- a/alc/alcontext.h +++ b/alc/alcontext.h @@ -202,7 +202,7 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext> { al::vector<WetBufferPtr> mWetBuffers; - std::atomic_flag mPropsClean; + al::atomic_invflag mPropsDirty; std::atomic<bool> mDeferUpdates{false}; std::mutex mPropLock; |