15 class EaxFxSlotsException
:
19 explicit EaxFxSlotsException(
22 EaxException
{"EAX_FX_SLOTS", message
}
25 }; // EaxFxSlotsException
31 void EaxFxSlots::initialize(
32 ALCcontext
& al_context
)
34 initialize_fx_slots(al_context
);
37 void EaxFxSlots::uninitialize() noexcept
39 for (auto& fx_slot
: fx_slots_
)
45 const ALeffectslot
& EaxFxSlots::get(EaxFxSlotIndex index
) const
47 if(!index
.has_value())
49 return *fx_slots_
[index
.value()];
52 ALeffectslot
& EaxFxSlots::get(EaxFxSlotIndex index
)
54 if(!index
.has_value())
56 return *fx_slots_
[index
.value()];
59 void EaxFxSlots::unlock_legacy() noexcept
61 fx_slots_
[0]->eax_unlock_legacy();
62 fx_slots_
[1]->eax_unlock_legacy();
66 void EaxFxSlots::fail(
69 throw EaxFxSlotsException
{message
};
72 void EaxFxSlots::initialize_fx_slots(
73 ALCcontext
& al_context
)
75 auto fx_slot_index
= EaxFxSlotIndexValue
{};
77 for (auto& fx_slot
: fx_slots_
)
79 fx_slot
= eax_create_al_effect_slot(al_context
);
80 fx_slot
->eax_initialize(al_context
, fx_slot_index
);