🛠️🐜 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.

56 lines
904 B

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