diff options
author | Chris Robinson <[email protected]> | 2022-06-18 20:12:15 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-06-19 07:44:01 -0700 |
commit | a6c099c63e87b4e3c91bbdcd102a3df2d4d05c8e (patch) | |
tree | c03c132f06154e19d1db49b6e27582521781aecf /al/source.cpp | |
parent | 3f05208c50f09abbb0bc66a3f2f9775c45d083b4 (diff) |
Track EAX1 source changes
Even though it's only a single value, this allows for not having to explicitly
track version changes, since the version being changed to will always have a
property change, implicitly marking an EAX update/commit for the source.
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/al/source.cpp b/al/source.cpp index 6b8baa8e..fd2d624b 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -4475,14 +4475,13 @@ void ALsource::eax_set(const EaxCall& call) const auto eax_version = call.get_version(); switch(eax_version) { - case 1: eax1_set(call, eax1_.d); break; + case 1: eax1_set(call, eax1_.d); eax1_.changed = true; break; case 2: eax2_set(call, eax2_.d); eax2_.changed = true; break; case 3: eax3_set(call, eax3_.d); eax3_.changed = true; break; case 4: eax4_set(call, eax4_.d); eax4_.changed = true; break; case 5: eax5_set(call, eax5_.d); eax5_.changed = true; break; default: eax_fail_unknown_property_id(); } - eax_is_version_changed_ |= (eax_version_ == eax_version); eax_version_ = eax_version; } @@ -4895,18 +4894,16 @@ void ALsource::eax_commit(EaxCommitType commit_type) const auto primary_fx_slot_id = eax_al_context_->eax_get_primary_fx_slot_index(); const auto is_primary_fx_slot_id_changed = (eax_primary_fx_slot_id_ != primary_fx_slot_id); - const auto is_forced = ( - eax_is_version_changed_ || - is_primary_fx_slot_id_changed || - commit_type == EaxCommitType::forced); + const auto is_forced = is_primary_fx_slot_id_changed || commit_type == EaxCommitType::forced; - eax_is_version_changed_ = false; eax_primary_fx_slot_id_ = primary_fx_slot_id; - switch (eax_version_) { + switch(eax_version_) + { case 1: - if(!is_forced && eax1_.i == eax1_.d) + if(!is_forced && !eax1_.changed) return; + eax1_.changed = false; eax1_.i = eax1_.d; eax1_translate(eax1_.i, eax_); break; |