Use kAudioObjectPropertyElementMaster on macOS for compatibility
[openal-soft.git] / al / eax / fx_slots.h
blobd2d90b24671cb4727e3dd2176cc9f0a4389b615e
1 #ifndef EAX_FX_SLOTS_INCLUDED
2 #define EAX_FX_SLOTS_INCLUDED
5 #include <array>
7 #include "al/auxeffectslot.h"
9 #include "fx_slot_index.h"
12 class EaxFxSlots {
13 public:
14 void initialize(ALCcontext& al_context);
16 void uninitialize() noexcept;
18 void commit()
20 for(auto& fx_slot : fx_slots_)
21 fx_slot->eax_commit();
25 [[nodiscard]] auto get(EaxFxSlotIndex index) const -> const ALeffectslot&;
27 [[nodiscard]] auto get(EaxFxSlotIndex index) -> ALeffectslot&;
29 private:
30 using Items = std::array<EaxAlEffectSlotUPtr, EAX_MAX_FXSLOTS>;
33 Items fx_slots_{};
36 [[noreturn]]
37 static void fail(const char* message);
39 void initialize_fx_slots(ALCcontext& al_context);
40 }; // EaxFxSlots
43 #endif // !EAX_FX_SLOTS_INCLUDED