]> git.tdb.fi Git - ext/openal.git/blob - al/eax/fx_slots.h
Import OpenAL Soft 1.23.1 sources
[ext/openal.git] / al / eax / fx_slots.h
1 #ifndef EAX_FX_SLOTS_INCLUDED
2 #define EAX_FX_SLOTS_INCLUDED
3
4
5 #include <array>
6
7 #include "al/auxeffectslot.h"
8
9 #include "api.h"
10 #include "call.h"
11 #include "fx_slot_index.h"
12
13
14 class EaxFxSlots
15 {
16 public:
17     void initialize(ALCcontext& al_context);
18
19     void uninitialize() noexcept;
20
21     void commit()
22     {
23         for(auto& fx_slot : fx_slots_)
24             fx_slot->eax_commit();
25     }
26
27
28     const ALeffectslot& get(
29         EaxFxSlotIndex index) const;
30
31     ALeffectslot& get(
32         EaxFxSlotIndex index);
33
34 private:
35     using Items = std::array<EaxAlEffectSlotUPtr, EAX_MAX_FXSLOTS>;
36
37
38     Items fx_slots_{};
39
40
41     [[noreturn]]
42     static void fail(
43         const char* message);
44
45     void initialize_fx_slots(ALCcontext& al_context);
46 }; // EaxFxSlots
47
48
49 #endif // !EAX_FX_SLOTS_INCLUDED