diff options
author | Chris Robinson <[email protected]> | 2022-02-08 16:36:40 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-02-08 16:36:40 -0800 |
commit | 7864895ab6082ffc6532e9cd2795ad66996a365d (patch) | |
tree | 59db946f4ae507d2e52180ad80d0bca82c7c721c /alc | |
parent | 6fb908bc38a0bfba1e21562495843b5d1f2468b5 (diff) |
Ensure sources update together from EAX commits
... when a listener property change forces a commit.
Diffstat (limited to 'alc')
-rw-r--r-- | alc/context.cpp | 13 | ||||
-rw-r--r-- | alc/context.h | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/alc/context.cpp b/alc/context.cpp index ea806d95..3dff6815 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -553,17 +553,20 @@ void ALCcontext::eax_update_filters() } } -void ALCcontext::eax_on_3d_listener_param_call() +void ALCcontext::eax_commit_sources() { - if (!has_eax()) - return; - std::unique_lock<std::mutex> source_lock{mSourceLock}; - for (auto& source : SourceListEnumerator{mSourceList}) source.eax_commit(); } +void ALCcontext::eax_commit_and_update_sources() +{ + std::unique_lock<std::mutex> source_lock{mSourceLock}; + for (auto& source : SourceListEnumerator{mSourceList}) + source.eax_commit_and_update(); +} + void ALCcontext::eax_set_last_error() noexcept { eax_last_error_ = EAXERR_INVALID_OPERATION; diff --git a/alc/context.h b/alc/context.h index 22c2418a..4b3e3461 100644 --- a/alc/context.h +++ b/alc/context.h @@ -233,7 +233,8 @@ public: void eax_update_filters(); - void eax_on_3d_listener_param_call(); + void eax_commit_sources(); + void eax_commit_and_update_sources(); void eax_set_last_error() noexcept; |