15 class EaxFxSlotsException
:
19 explicit EaxFxSlotsException(
22 EaxException
{"EAX_FX_SLOTS", message
}
25 }; // EaxFxSlotsException
31 void EaxFxSlots::initialize(ALCcontext
& al_context
)
33 initialize_fx_slots(al_context
);
36 void EaxFxSlots::uninitialize() noexcept
38 for (auto& fx_slot
: fx_slots_
)
44 const ALeffectslot
& EaxFxSlots::get(EaxFxSlotIndex index
) const
46 if(!index
.has_value())
48 return *fx_slots_
[index
.value()];
51 ALeffectslot
& EaxFxSlots::get(EaxFxSlotIndex index
)
53 if(!index
.has_value())
55 return *fx_slots_
[index
.value()];
59 void EaxFxSlots::fail(
62 throw EaxFxSlotsException
{message
};
65 void EaxFxSlots::initialize_fx_slots(ALCcontext
& al_context
)
67 auto fx_slot_index
= EaxFxSlotIndexValue
{};
69 for (auto& fx_slot
: fx_slots_
)
71 fx_slot
= eax_create_al_effect_slot(al_context
);
72 fx_slot
->eax_initialize(al_context
, fx_slot_index
);