Don't pass an EaxCall to initialize_fx_slots
This commit is contained in:
parent
af5d4fb77d
commit
7b0776e33f
@ -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{};
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user