Define the CoreAudio default name only when needed
[openal-soft.git] / al / buffer.h
blob8c323bea5aa7c14137585ef2ee3c069e7198aa04
1 #ifndef AL_BUFFER_H
2 #define AL_BUFFER_H
4 #include <atomic>
6 #include "AL/al.h"
8 #include "albyte.h"
9 #include "alc/inprogext.h"
10 #include "almalloc.h"
11 #include "atomic.h"
12 #include "core/buffer_storage.h"
13 #include "vector.h"
15 #ifdef ALSOFT_EAX
16 #include "eax_x_ram.h"
17 #endif // ALSOFT_EAX
19 /* User formats */
20 enum UserFmtType : unsigned char {
21 UserFmtUByte = FmtUByte,
22 UserFmtShort = FmtShort,
23 UserFmtFloat = FmtFloat,
24 UserFmtMulaw = FmtMulaw,
25 UserFmtAlaw = FmtAlaw,
26 UserFmtDouble = FmtDouble,
28 UserFmtIMA4 = 128,
29 UserFmtMSADPCM,
31 enum UserFmtChannels : unsigned char {
32 UserFmtMono = FmtMono,
33 UserFmtStereo = FmtStereo,
34 UserFmtRear = FmtRear,
35 UserFmtQuad = FmtQuad,
36 UserFmtX51 = FmtX51,
37 UserFmtX61 = FmtX61,
38 UserFmtX71 = FmtX71,
39 UserFmtBFormat2D = FmtBFormat2D,
40 UserFmtBFormat3D = FmtBFormat3D,
41 UserFmtUHJ2 = FmtUHJ2,
42 UserFmtUHJ3 = FmtUHJ3,
43 UserFmtUHJ4 = FmtUHJ4,
47 struct ALbuffer : public BufferStorage {
48 ALbitfieldSOFT Access{0u};
50 al::vector<al::byte,16> mData;
52 UserFmtType OriginalType{UserFmtShort};
53 ALuint OriginalSize{0};
54 ALuint OriginalAlign{0};
56 ALuint UnpackAlign{0};
57 ALuint PackAlign{0};
58 ALuint UnpackAmbiOrder{1};
60 ALbitfieldSOFT MappedAccess{0u};
61 ALsizei MappedOffset{0};
62 ALsizei MappedSize{0};
64 ALuint mLoopStart{0u};
65 ALuint mLoopEnd{0u};
67 /* Number of times buffer was attached to a source (deletion can only occur when 0) */
68 RefCount ref{0u};
70 /* Self ID */
71 ALuint id{0};
73 DISABLE_ALLOC()
75 #ifdef ALSOFT_EAX
76 ALenum eax_x_ram_mode{AL_STORAGE_AUTOMATIC};
77 bool eax_x_ram_is_hardware{};
78 bool eax_x_ram_is_dirty{};
79 #endif // ALSOFT_EAX
82 #endif