diff options
author | Chris Robinson <[email protected]> | 2022-03-05 01:14:26 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-03-05 01:14:26 -0800 |
commit | 2dc9cf170c08f0b7f35ec46cb17c829888e7392c (patch) | |
tree | 76865c75ba9cd0dce3452988ff28ac7636a82872 /al/eax_eax_call.cpp | |
parent | 7bec22abb61fa1b87e157dd6b577ba174d3273d3 (diff) |
Simplify committing EAX properties
Based on DirectSound's EAX behavior, committing any EAX property commits *all*
deferred property changes, not just the object being changed. So applying EAX
changes can be handled in one place.
Diffstat (limited to 'al/eax_eax_call.cpp')
-rw-r--r-- | al/eax_eax_call.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/al/eax_eax_call.cpp b/al/eax_eax_call.cpp index dfd7f7f7..914d2fbf 100644 --- a/al/eax_eax_call.cpp +++ b/al/eax_eax_call.cpp @@ -31,10 +31,9 @@ EaxEaxCall::EaxEaxCall( ALuint property_source_id, ALvoid* property_buffer, ALuint property_size) - : is_get_{is_get}, is_deferred_{(property_id&deferred_flag) != 0}, version_{0} - , property_set_id_{EaxEaxCallPropertySetId::none}, property_id_{property_id & ~deferred_flag} - , property_source_id_{property_source_id}, property_buffer_{property_buffer} - , property_size_{property_size} + : is_get_{is_get}, version_{0}, property_set_id_{EaxEaxCallPropertySetId::none} + , property_id_{property_id & ~deferred_flag}, property_source_id_{property_source_id} + , property_buffer_{property_buffer}, property_size_{property_size} { if (false) { @@ -152,17 +151,9 @@ EaxEaxCall::EaxEaxCall( fail("EAX version out of range."); } - if (is_deferred_) + if(!(property_id&deferred_flag)) { - if (version_ == 1) - { - fail("EAX1 does not support deferring."); - } - } - else - { - if (property_set_id_ != EaxEaxCallPropertySetId::fx_slot && - property_id_ != 0) + if(property_set_id_ != EaxEaxCallPropertySetId::fx_slot && property_id_ != 0) { if (!property_buffer) { @@ -176,8 +167,7 @@ EaxEaxCall::EaxEaxCall( } } - if (property_set_id_ == EaxEaxCallPropertySetId::source && - property_source_id_ == 0) + if(property_set_id_ == EaxEaxCallPropertySetId::source && property_source_id_ == 0) { fail("Null AL source id."); } |