diff options
Diffstat (limited to 'al/source.h')
-rw-r--r-- | al/source.h | 16 |
1 files changed, 16 insertions, 0 deletions
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 |