aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--al/auxeffectslot.cpp12
-rw-r--r--al/auxeffectslot.h8
-rw-r--r--al/eax/fx_slots.cpp12
-rw-r--r--al/eax/fx_slots.h8
-rw-r--r--alc/context.cpp13
-rw-r--r--alc/context.h4
6 files changed, 19 insertions, 38 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp
index aaf9ce4c..162b5137 100644
--- a/al/auxeffectslot.cpp
+++ b/al/auxeffectslot.cpp
@@ -1055,10 +1055,7 @@ EffectSlotSubList::~EffectSlotSubList()
}
#ifdef ALSOFT_EAX
-void ALeffectslot::eax_initialize(
- const EaxCall& call,
- ALCcontext& al_context,
- EaxFxSlotIndexValue index)
+void ALeffectslot::eax_initialize(ALCcontext& al_context, EaxFxSlotIndexValue index)
{
if(index >= EAX_MAX_FXSLOTS)
eax_fail("Index out of range.");
@@ -1066,15 +1063,10 @@ void ALeffectslot::eax_initialize(
mPropsDirty = true;
eax_al_context_ = &al_context;
eax_fx_slot_index_ = index;
- eax_version_ = call.get_version();
+ eax_version_ = eax_al_context_->eax_get_version();
eax_fx_slot_set_defaults();
}
-const EAX50FXSLOTPROPERTIES& ALeffectslot::eax_get_eax_fx_slot() const noexcept
-{
- return eax_;
-}
-
void ALeffectslot::eax_commit()
{
auto df = EaxDirtyFlags{};
diff --git a/al/auxeffectslot.h b/al/auxeffectslot.h
index b8b41174..78b0c95a 100644
--- a/al/auxeffectslot.h
+++ b/al/auxeffectslot.h
@@ -82,12 +82,10 @@ struct ALeffectslot {
#ifdef ALSOFT_EAX
public:
- void eax_initialize(
- const EaxCall& call,
- ALCcontext& al_context,
- EaxFxSlotIndexValue index);
+ void eax_initialize(ALCcontext& al_context, EaxFxSlotIndexValue index);
- const EAX50FXSLOTPROPERTIES& eax_get_eax_fx_slot() const noexcept;
+ const EAX50FXSLOTPROPERTIES& eax_get_eax_fx_slot() const noexcept
+ { return eax_; }
// Returns `true` if all sources should be updated, or `false` otherwise.
bool eax_dispatch(const EaxCall& call)
diff --git a/al/eax/fx_slots.cpp b/al/eax/fx_slots.cpp
index 83de8f78..d04b70df 100644
--- a/al/eax/fx_slots.cpp
+++ b/al/eax/fx_slots.cpp
@@ -28,11 +28,9 @@ public:
} // namespace
-void EaxFxSlots::initialize(
- const EaxCall& call,
- ALCcontext& al_context)
+void EaxFxSlots::initialize(ALCcontext& al_context)
{
- initialize_fx_slots(call, al_context);
+ initialize_fx_slots(al_context);
}
void EaxFxSlots::uninitialize() noexcept
@@ -64,16 +62,14 @@ void EaxFxSlots::fail(
throw EaxFxSlotsException{message};
}
-void EaxFxSlots::initialize_fx_slots(
- const EaxCall& call,
- ALCcontext& al_context)
+void EaxFxSlots::initialize_fx_slots(ALCcontext& al_context)
{
auto fx_slot_index = EaxFxSlotIndexValue{};
for (auto& fx_slot : fx_slots_)
{
fx_slot = eax_create_al_effect_slot(al_context);
- fx_slot->eax_initialize(call, al_context, fx_slot_index);
+ fx_slot->eax_initialize(al_context, fx_slot_index);
fx_slot_index += 1;
}
}
diff --git a/al/eax/fx_slots.h b/al/eax/fx_slots.h
index cb7e0db4..18b2d3ad 100644
--- a/al/eax/fx_slots.h
+++ b/al/eax/fx_slots.h
@@ -14,9 +14,7 @@
class EaxFxSlots
{
public:
- void initialize(
- const EaxCall& call,
- ALCcontext& al_context);
+ void initialize(ALCcontext& al_context);
void uninitialize() noexcept;
@@ -44,9 +42,7 @@ private:
static void fail(
const char* message);
- void initialize_fx_slots(
- const EaxCall& call,
- ALCcontext& al_context);
+ void initialize_fx_slots(ALCcontext& al_context);
}; // EaxFxSlots
diff --git a/alc/context.cpp b/alc/context.cpp
index 3dbeaea0..403c4fa3 100644
--- a/alc/context.cpp
+++ b/alc/context.cpp
@@ -324,8 +324,7 @@ ALenum ALCcontext::eax_eax_set(
if(eax_version != eax_version_)
eax_df_ = ~EaxDirtyFlags();
eax_version_ = eax_version;
-
- eax_initialize(call);
+ eax_initialize();
switch(call.get_property_set_id())
{
@@ -364,7 +363,7 @@ ALenum ALCcontext::eax_eax_get(
property_value,
property_value_size);
eax_version_ = call.get_version();
- eax_initialize(call);
+ eax_initialize();
switch(call.get_property_set_id())
{
@@ -466,7 +465,7 @@ void ALCcontext::eax_initialize_extensions()
mExtensionList = eax_extension_list_.c_str();
}
-void ALCcontext::eax_initialize(const EaxCall& call)
+void ALCcontext::eax_initialize()
{
if(eax_is_initialized_)
return;
@@ -483,7 +482,7 @@ void ALCcontext::eax_initialize(const EaxCall& call)
eax_set_defaults();
eax_context_commit_air_absorbtion_hf();
eax_update_speaker_configuration();
- eax_initialize_fx_slots(call);
+ eax_initialize_fx_slots();
eax_initialize_sources();
eax_is_initialized_ = true;
@@ -761,9 +760,9 @@ void ALCcontext::eax_context_commit_macro_fx_factor()
// TODO
}
-void ALCcontext::eax_initialize_fx_slots(const EaxCall& call)
+void ALCcontext::eax_initialize_fx_slots()
{
- eax_fx_slots_.initialize(call, *this);
+ eax_fx_slots_.initialize(*this);
eax_primary_fx_slot_index_ = eax_.guidPrimaryFXSlotID;
}
diff --git a/alc/context.h b/alc/context.h
index 3046c8b7..660a6559 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -456,7 +456,7 @@ private:
}
void eax_initialize_extensions();
- void eax_initialize(const EaxCall& call);
+ void eax_initialize();
bool eax_has_no_default_effect_slot() const noexcept;
void eax_ensure_no_default_effect_slot() const;
@@ -492,7 +492,7 @@ private:
void eax_context_commit_hf_reference();
void eax_context_commit_macro_fx_factor();
- void eax_initialize_fx_slots(const EaxCall& call);
+ void eax_initialize_fx_slots();
void eax_update_sources();