🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
837 B

  1. #ifndef EAX_FX_SLOTS_INCLUDED
  2. #define EAX_FX_SLOTS_INCLUDED
  3. #include <array>
  4. #include "al/auxeffectslot.h"
  5. #include "eax_api.h"
  6. #include "eax_fx_slot_index.h"
  7. class EaxFxSlots
  8. {
  9. public:
  10. void initialize(
  11. ALCcontext& al_context);
  12. void uninitialize() noexcept;
  13. void commit()
  14. {
  15. for(auto& fx_slot : fx_slots_)
  16. fx_slot->eax_commit();
  17. }
  18. const ALeffectslot& get(
  19. EaxFxSlotIndex index) const;
  20. ALeffectslot& get(
  21. EaxFxSlotIndex index);
  22. void unlock_legacy() noexcept;
  23. private:
  24. using Items = std::array<EaxAlEffectSlotUPtr, EAX_MAX_FXSLOTS>;
  25. Items fx_slots_{};
  26. [[noreturn]]
  27. static void fail(
  28. const char* message);
  29. void initialize_fx_slots(
  30. ALCcontext& al_context);
  31. }; // EaxFxSlots
  32. #endif // !EAX_FX_SLOTS_INCLUDED