axmol/thirdparty/openal/al/eax/fx_slots.h

57 lines
904 B
C
Raw Normal View History

2022-04-25 12:02:45 +08:00
#ifndef EAX_FX_SLOTS_INCLUDED
#define EAX_FX_SLOTS_INCLUDED
#include <array>
#include "al/auxeffectslot.h"
#include "api.h"
#include "call.h"
#include "fx_slot_index.h"
2022-04-25 12:02:45 +08:00
class EaxFxSlots
{
public:
void initialize(
const EaxCall& call,
2022-04-25 12:02:45 +08:00
ALCcontext& al_context);
void uninitialize() noexcept;
void commit()
{
for(auto& fx_slot : fx_slots_)
fx_slot->eax_commit();
}
const ALeffectslot& get(
EaxFxSlotIndex index) const;
ALeffectslot& get(
EaxFxSlotIndex index);
void unlock_legacy() noexcept;
private:
using Items = std::array<EaxAlEffectSlotUPtr, EAX_MAX_FXSLOTS>;
Items fx_slots_{};
[[noreturn]]
static void fail(
const char* message);
void initialize_fx_slots(
const EaxCall& call,
2022-04-25 12:02:45 +08:00
ALCcontext& al_context);
}; // EaxFxSlots
#endif // !EAX_FX_SLOTS_INCLUDED