14 #include "alc/inprogext.h"
16 #include "alnumeric.h"
17 #include "core/buffer_storage.h"
21 enum class EaxStorage
: uint8_t {
29 struct ALbuffer
: public BufferStorage
{
30 ALbitfieldSOFT Access
{0u};
32 al::vector
<std::byte
,16> mDataStorage
;
34 ALuint OriginalSize
{0};
36 ALuint UnpackAlign
{0};
38 ALuint UnpackAmbiOrder
{1};
40 ALbitfieldSOFT MappedAccess
{0u};
41 ALsizei MappedOffset
{0};
42 ALsizei MappedSize
{0};
44 ALuint mLoopStart
{0u};
47 /* Number of times buffer was attached to a source (deletion can only occur when 0) */
48 std::atomic
<ALuint
> ref
{0u};
53 static void SetName(ALCcontext
*context
, ALuint id
, std::string_view name
);
58 EaxStorage eax_x_ram_mode
{EaxStorage::Automatic
};
59 bool eax_x_ram_is_hardware
{};
63 struct BufferSubList
{
64 uint64_t FreeMask
{~0_u64
};
65 gsl::owner
<std::array
<ALbuffer
,64>*> Buffers
{nullptr};
67 BufferSubList() noexcept
= default;
68 BufferSubList(const BufferSubList
&) = delete;
69 BufferSubList(BufferSubList
&& rhs
) noexcept
: FreeMask
{rhs
.FreeMask
}, Buffers
{rhs
.Buffers
}
70 { rhs
.FreeMask
= ~0_u64
; rhs
.Buffers
= nullptr; }
73 BufferSubList
& operator=(const BufferSubList
&) = delete;
74 BufferSubList
& operator=(BufferSubList
&& rhs
) noexcept
75 { std::swap(FreeMask
, rhs
.FreeMask
); std::swap(Buffers
, rhs
.Buffers
); return *this; }