aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris I. Bendovsky <[email protected]>2022-07-14 20:24:52 +0300
committerBoris I. Bendovsky <[email protected]>2022-07-17 20:59:04 +0300
commitc88c5e6189fda16bdc0f9d87d64f5e11a8f1a40a (patch)
tree05eaacf7b5e816603d73c709ea2851129489cfe1
parente9bb078806f7b34d7214cd9b9a50d0deeea9c0c5 (diff)
[EAX_FX_SLOT] Mark sources as changed instead of commiting them to catch up with changes in FX slot
-rw-r--r--al/source.h1
-rw-r--r--alc/context.cpp7
-rw-r--r--alc/context.h1
3 files changed, 2 insertions, 7 deletions
diff --git a/al/source.h b/al/source.h
index a1efd527..554ead5f 100644
--- a/al/source.h
+++ b/al/source.h
@@ -163,6 +163,7 @@ public:
void eax_dispatch(const EaxCall& call);
void eax_commit() { eax_commit(EaxCommitType::normal); }
void eax_commit_and_update();
+ void eax_mark_as_changed() { eax_changed_ = true; }
bool eax_is_initialized() const noexcept { return eax_al_context_ != nullptr; }
static ALsource* eax_lookup_source(ALCcontext& al_context, ALuint source_id) noexcept;
diff --git a/alc/context.cpp b/alc/context.cpp
index 403c4fa3..3decb5c4 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -384,11 +384,6 @@ ALenum ALCcontext::eax_eax_get(
return AL_NO_ERROR;
}
-void ALCcontext::eax_update_filters()
-{
- ForEachSource(this, [](ALsource& source){ source.eax_commit(); });
-}
-
void ALCcontext::eax_commit_and_update_sources()
{
std::unique_lock<std::mutex> source_lock{mSourceLock};
@@ -626,7 +621,7 @@ void ALCcontext::eax_dispatch_fx_slot(const EaxCall& call)
if(fx_slot.eax_dispatch(call))
{
std::lock_guard<std::mutex> source_lock{mSourceLock};
- eax_update_filters();
+ ForEachSource(this, [](ALsource& source){ source.eax_mark_as_changed(); });
}
}
diff --git a/alc/context.h b/alc/context.h
index 660a6559..2b1fac75 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -204,7 +204,6 @@ public:
ALvoid* property_value,
ALuint property_value_size);
- void eax_update_filters();
void eax_commit_and_update_sources();
void eax_set_last_error() noexcept;