aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
Diffstat (limited to 'al')
-rw-r--r--al/auxeffectslot.h18
-rw-r--r--al/buffer.h17
-rw-r--r--al/effect.h18
-rw-r--r--al/filter.h18
-rw-r--r--al/source.h16
5 files changed, 87 insertions, 0 deletions
diff --git a/al/auxeffectslot.h b/al/auxeffectslot.h
index fc474bb4..6946591e 100644
--- a/al/auxeffectslot.h
+++ b/al/auxeffectslot.h
@@ -3,6 +3,7 @@
#include <atomic>
#include <cstddef>
+#include <cstdint>
#include <string_view>
#include "AL/al.h"
@@ -12,6 +13,7 @@
#include "alc/device.h"
#include "alc/effects/base.h"
#include "almalloc.h"
+#include "alnumeric.h"
#include "atomic.h"
#include "core/effectslot.h"
#include "intrusive_ptr.h"
@@ -367,4 +369,20 @@ EaxAlEffectSlotUPtr eax_create_al_effect_slot(ALCcontext& context);
void eax_delete_al_effect_slot(ALCcontext& context, ALeffectslot& effect_slot);
#endif // ALSOFT_EAX
+struct EffectSlotSubList {
+ uint64_t FreeMask{~0_u64};
+ gsl::owner<std::array<ALeffectslot,64>*> EffectSlots{nullptr};
+
+ EffectSlotSubList() noexcept = default;
+ EffectSlotSubList(const EffectSlotSubList&) = delete;
+ EffectSlotSubList(EffectSlotSubList&& rhs) noexcept
+ : FreeMask{rhs.FreeMask}, EffectSlots{rhs.EffectSlots}
+ { rhs.FreeMask = ~0_u64; rhs.EffectSlots = nullptr; }
+ ~EffectSlotSubList();
+
+ EffectSlotSubList& operator=(const EffectSlotSubList&) = delete;
+ EffectSlotSubList& operator=(EffectSlotSubList&& rhs) noexcept
+ { std::swap(FreeMask, rhs.FreeMask); std::swap(EffectSlots, rhs.EffectSlots); return *this; }
+};
+
#endif
diff --git a/al/buffer.h b/al/buffer.h
index 2bcab6cf..b9e59d68 100644
--- a/al/buffer.h
+++ b/al/buffer.h
@@ -3,12 +3,14 @@
#include <atomic>
#include <cstddef>
+#include <cstdint>
#include <string_view>
#include "AL/al.h"
#include "alc/inprogext.h"
#include "almalloc.h"
+#include "alnumeric.h"
#include "atomic.h"
#include "core/buffer_storage.h"
#include "vector.h"
@@ -58,4 +60,19 @@ struct ALbuffer : public BufferStorage {
#endif // ALSOFT_EAX
};
+struct BufferSubList {
+ uint64_t FreeMask{~0_u64};
+ gsl::owner<std::array<ALbuffer,64>*> Buffers{nullptr};
+
+ BufferSubList() noexcept = default;
+ BufferSubList(const BufferSubList&) = delete;
+ BufferSubList(BufferSubList&& rhs) noexcept : FreeMask{rhs.FreeMask}, Buffers{rhs.Buffers}
+ { rhs.FreeMask = ~0_u64; rhs.Buffers = nullptr; }
+ ~BufferSubList();
+
+ BufferSubList& operator=(const BufferSubList&) = delete;
+ BufferSubList& operator=(BufferSubList&& rhs) noexcept
+ { std::swap(FreeMask, rhs.FreeMask); std::swap(Buffers, rhs.Buffers); return *this; }
+};
+
#endif
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
diff --git a/al/filter.h b/al/filter.h
index b87e7f03..20d5e012 100644
--- a/al/filter.h
+++ b/al/filter.h
@@ -1,6 +1,8 @@
#ifndef AL_FILTER_H
#define AL_FILTER_H
+#include <array>
+#include <cstdint>
#include <string_view>
#include <variant>
@@ -9,6 +11,7 @@
#include "AL/alext.h"
#include "almalloc.h"
+#include "alnumeric.h"
#define LOWPASSFREQREF 5000.0f
#define HIGHPASSFREQREF 250.0f
@@ -54,4 +57,19 @@ struct ALfilter {
DISABLE_ALLOC
};
+struct FilterSubList {
+ uint64_t FreeMask{~0_u64};
+ gsl::owner<std::array<ALfilter,64>*> Filters{nullptr};
+
+ FilterSubList() noexcept = default;
+ FilterSubList(const FilterSubList&) = delete;
+ FilterSubList(FilterSubList&& rhs) noexcept : FreeMask{rhs.FreeMask}, Filters{rhs.Filters}
+ { rhs.FreeMask = ~0_u64; rhs.Filters = nullptr; }
+ ~FilterSubList();
+
+ FilterSubList& operator=(const FilterSubList&) = delete;
+ FilterSubList& operator=(FilterSubList&& rhs) noexcept
+ { std::swap(FreeMask, rhs.FreeMask); std::swap(Filters, rhs.Filters); return *this; }
+};
+
#endif
diff --git a/al/source.h b/al/source.h
index 1a93d927..84fd7664 100644
--- a/al/source.h
+++ b/al/source.h
@@ -4,6 +4,7 @@
#include <array>
#include <atomic>
#include <cstddef>
+#include <cstdint>
#include <deque>
#include <iterator>
#include <limits>
@@ -1042,4 +1043,19 @@ private:
void UpdateAllSourceProps(ALCcontext *context);
+struct SourceSubList {
+ uint64_t FreeMask{~0_u64};
+ gsl::owner<std::array<ALsource,64>*> Sources{nullptr};
+
+ SourceSubList() noexcept = default;
+ SourceSubList(const SourceSubList&) = delete;
+ SourceSubList(SourceSubList&& rhs) noexcept : FreeMask{rhs.FreeMask}, Sources{rhs.Sources}
+ { rhs.FreeMask = ~0_u64; rhs.Sources = nullptr; }
+ ~SourceSubList();
+
+ SourceSubList& operator=(const SourceSubList&) = delete;
+ SourceSubList& operator=(SourceSubList&& rhs) noexcept
+ { std::swap(FreeMask, rhs.FreeMask); std::swap(Sources, rhs.Sources); return *this; }
+};
+
#endif