From d7cabd2c57025c7f3dad81c22c397ac27183102e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 5 Feb 2023 10:34:21 -0800 Subject: Don't set an EAX version by default for sources Presuming sources start in a neutral state for EAX effects, that is they're not affected by EAX by default, there's no need to set an active EAX state for one until the app sets an EAX property on it. Since the deferred and immediate properties are stored independently per-version, they can always be set to defaults, and simply not have a particular version committed as active until the app sets an EAX property, which will inherently set the active version. --- alc/context.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'alc') diff --git a/alc/context.cpp b/alc/context.cpp index b1b95321..32bd36eb 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -487,7 +487,6 @@ void ALCcontext::eax_initialize() eax_context_commit_air_absorbtion_hf(); eax_update_speaker_configuration(); eax_initialize_fx_slots(); - eax_initialize_sources(); eax_is_initialized_ = true; mPropsDirty = true; @@ -806,14 +805,6 @@ void ALCcontext::eax_initialize_fx_slots() eax_primary_fx_slot_index_ = eax_.guidPrimaryFXSlotID; } -void ALCcontext::eax_initialize_sources() -{ - std::unique_lock source_lock{mSourceLock}; - auto init_source = [this](ALsource &source) noexcept - { source.eax_initialize(this); }; - ForEachSource(this, init_source); -} - void ALCcontext::eax_update_sources() { std::unique_lock source_lock{mSourceLock}; -- cgit v1.2.3