diff options
author | Chris Robinson <[email protected]> | 2022-02-13 21:13:13 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-02-13 21:13:13 -0800 |
commit | 1e687ebc8b3f2fe7042978a343a77a67ee7db40d (patch) | |
tree | c5dc06f5fd9d134042c6e10104a17dbd169399fb /alc/context.cpp | |
parent | 3e6d210767e432c780f892b2365f3644456b61b3 (diff) |
Force EAX calls to defer when the AL context is deferring
Diffstat (limited to 'alc/context.cpp')
-rw-r--r-- | alc/context.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/alc/context.cpp b/alc/context.cpp index c21bd1b9..69e42731 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -465,10 +465,11 @@ ALenum ALCcontext::eax_eax_set( { eax_initialize(); + constexpr auto deferred_flag = 0x80000000u; const auto eax_call = create_eax_call( false, property_set_id, - property_id, + property_id | (mDeferUpdates ? deferred_flag : 0u), property_source_id, property_value, property_value_size @@ -1281,22 +1282,20 @@ void ALCcontext::eax_set( eax_fail("Unsupported property id."); } - if (!eax_call.is_deferred()) + if(!eax_call.is_deferred()) { eax_apply_deferred(); - if(!mDeferUpdates) - { - mHoldUpdates.store(true, std::memory_order_release); - while((mUpdateCount.load(std::memory_order_acquire)&1) != 0) { - /* busy-wait */ - } - - if(std::exchange(mPropsDirty, false)) - UpdateContextProps(this); - UpdateAllSourceProps(this); - mHoldUpdates.store(false, std::memory_order_release); + mHoldUpdates.store(true, std::memory_order_release); + while((mUpdateCount.load(std::memory_order_acquire)&1) != 0) { + /* busy-wait */ } + + if(std::exchange(mPropsDirty, false)) + UpdateContextProps(this); + UpdateAllSourceProps(this); + + mHoldUpdates.store(false, std::memory_order_release); } } |