diff options
author | Boris I. Bendovsky <[email protected]> | 2022-07-12 12:46:51 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2022-07-12 02:46:51 -0700 |
commit | 6fb5cb553f4c2faf4b991ac377ec457a7bba7e4c (patch) | |
tree | 5b62a1111fa1a48f3a2e226b8491bc1615db865d /alc/context.cpp | |
parent | fa51c89549590319cb545a8c81419e2e1ddc5db3 (diff) |
[EAX] Use separate FX slot state for each version (#730)
* [EAX] Use separate FX slot state for each version
[EAX] Don't defer FX slot properties
* [EAX_FXSLOT] Use mPropsDirty to defer update
[EAX_CONTEXT] Commit all updates on first initialization
Diffstat (limited to 'alc/context.cpp')
-rw-r--r-- | alc/context.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/alc/context.cpp b/alc/context.cpp index 9292926c..acd21a1d 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -339,7 +339,6 @@ ALenum ALCcontext::eax_eax_set( property_value_size); eax_version_ = call.get_version(); eax_initialize(call); - eax_unlock_legacy_fx_slots(call); switch (call.get_property_set_id()) { @@ -360,8 +359,7 @@ ALenum ALCcontext::eax_eax_set( eax_fail("Unsupported property set id."); } - static constexpr auto deferred_flag = 0x80000000u; - if(!(property_id&deferred_flag) && !mDeferUpdates) + if(!call.is_deferred() && !mDeferUpdates) applyAllUpdates(); return AL_NO_ERROR; @@ -383,7 +381,6 @@ ALenum ALCcontext::eax_eax_get( property_value_size); eax_version_ = call.get_version(); eax_initialize(call); - eax_unlock_legacy_fx_slots(call); switch (call.get_property_set_id()) { @@ -501,6 +498,9 @@ void ALCcontext::eax_initialize(const EaxCall& call) eax_initialize_sources(); eax_is_initialized_ = true; + + if(!mDeferUpdates) + applyAllUpdates(); } bool ALCcontext::eax_has_no_default_effect_slot() const noexcept @@ -603,15 +603,6 @@ void ALCcontext::eax_set_defaults() noexcept eax_d_ = eax_; } -void ALCcontext::eax_unlock_legacy_fx_slots(const EaxCall& call) noexcept -{ - if (call.get_version() != 5 || eax_are_legacy_fx_slots_unlocked_) - return; - - eax_are_legacy_fx_slots_unlocked_ = true; - eax_fx_slots_.unlock_legacy(); -} - void ALCcontext::eax_dispatch_fx_slot(const EaxCall& call) { const auto fx_slot_index = call.get_fx_slot_index(); |