Use acquire-release semantics for changing deferred updates
This commit is contained in:
+1
-1
@@ -1621,7 +1621,7 @@ void SetDefaultChannelOrder(ALCdevice *device)
|
||||
void ALCcontext::processUpdates()
|
||||
{
|
||||
std::lock_guard<std::mutex> _{mPropLock};
|
||||
if(mDeferUpdates.exchange(false))
|
||||
if(mDeferUpdates.exchange(false, std::memory_order_acq_rel))
|
||||
{
|
||||
/* Tell the mixer to stop applying updates, then wait for any active
|
||||
* updating to finish, before providing updates.
|
||||
|
||||
+1
-1
@@ -217,7 +217,7 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext> {
|
||||
* This does *NOT* stop mixing, but rather prevents certain property
|
||||
* changes from taking effect.
|
||||
*/
|
||||
void deferUpdates() noexcept { mDeferUpdates.store(true); }
|
||||
void deferUpdates() noexcept { mDeferUpdates.exchange(true, std::memory_order_acq_rel); }
|
||||
|
||||
/** Resumes update processing after being deferred. */
|
||||
void processUpdates();
|
||||
|
||||
Reference in New Issue
Block a user