diff options
author | Chris Robinson <[email protected]> | 2022-05-16 02:08:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-05-16 02:08:18 -0700 |
commit | 65e4c20c27f2acf853e58fd4c26ebc0e3eb926c6 (patch) | |
tree | 4fb9a3bffbda4ab8dc1363caa2426cf8e8bbf30e /al/eax/fx_slots.h | |
parent | 83238973ed08225adf03e76b6933e0c209f93fd9 (diff) |
Move EAX files to their own sub-directory
Diffstat (limited to 'al/eax/fx_slots.h')
-rw-r--r-- | al/eax/fx_slots.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/al/eax/fx_slots.h b/al/eax/fx_slots.h new file mode 100644 index 00000000..49cabd75 --- /dev/null +++ b/al/eax/fx_slots.h @@ -0,0 +1,53 @@ +#ifndef EAX_FX_SLOTS_INCLUDED +#define EAX_FX_SLOTS_INCLUDED + + +#include <array> + +#include "al/auxeffectslot.h" + +#include "api.h" +#include "fx_slot_index.h" + + +class EaxFxSlots +{ +public: + void initialize( + 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( + ALCcontext& al_context); +}; // EaxFxSlots + + +#endif // !EAX_FX_SLOTS_INCLUDED |