aboutsummaryrefslogtreecommitdiffstats
path: root/al/effect.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-29 09:05:47 -0800
committerChris Robinson <[email protected]>2023-12-29 09:05:47 -0800
commitcfab14287405a0d34f6a0fec1336f46415728fcf (patch)
treee3b1094949aff49c7f38160d17e543c84c66e669 /al/effect.h
parenta6942c271f1b27c79e274bdc87aa370b3bb81cc2 (diff)
Move struct definitions to more appropriate headers
Diffstat (limited to 'al/effect.h')
-rw-r--r--al/effect.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/al/effect.h b/al/effect.h
index 820c7d28..8f069bee 100644
--- a/al/effect.h
+++ b/al/effect.h
@@ -3,6 +3,7 @@
#include <array>
#include <bitset>
+#include <cstdint>
#include <string_view>
#include "AL/al.h"
@@ -10,6 +11,8 @@
#include "al/effects/effects.h"
#include "alc/effects/base.h"
+#include "almalloc.h"
+#include "alnumeric.h"
enum {
@@ -61,4 +64,19 @@ void LoadReverbPreset(const char *name, ALeffect *effect);
bool IsValidEffectType(ALenum type) noexcept;
+struct EffectSubList {
+ uint64_t FreeMask{~0_u64};
+ gsl::owner<std::array<ALeffect,64>*> Effects{nullptr}; /* 64 */
+
+ EffectSubList() noexcept = default;
+ EffectSubList(const EffectSubList&) = delete;
+ EffectSubList(EffectSubList&& rhs) noexcept : FreeMask{rhs.FreeMask}, Effects{rhs.Effects}
+ { rhs.FreeMask = ~0_u64; rhs.Effects = nullptr; }
+ ~EffectSubList();
+
+ EffectSubList& operator=(const EffectSubList&) = delete;
+ EffectSubList& operator=(EffectSubList&& rhs) noexcept
+ { std::swap(FreeMask, rhs.FreeMask); std::swap(Effects, rhs.Effects); return *this; }
+};
+
#endif