1 2 // Copyright 2018 - 2021 Michael D. Parker 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 7 module bindbc.openal.types; 8 9 enum ALSupport { 10 noLibrary, 11 badLibrary, 12 al11, 13 } 14 15 enum AL_VERSION_1_0 = true; 16 enum AL_VERSION_1_1 = true; 17 enum alSupport = ALSupport.al11; 18 19 alias ALboolean = byte; 20 alias ALchar = char; 21 alias ALbyte = byte; 22 alias ALubyte = ubyte; 23 alias ALshort = short; 24 alias ALushort = ushort; 25 alias ALint = int; 26 alias ALuint = uint; 27 alias ALsizei = int; 28 alias ALenum = int; 29 alias ALfloat = float; 30 alias ALdouble = double; 31 alias ALvoid = void; 32 33 enum : ALboolean { 34 AL_FALSE = 0, 35 AL_TRUE = 1, 36 } 37 38 enum : ALenum { 39 AL_INVALID = -1, 40 AL_NONE = 0, 41 42 AL_SOURCE_RELATIVE = 0x202, 43 44 AL_CONE_INNER_ANGLE = 0x1001, 45 AL_CONE_OUTER_ANGLE = 0x1002, 46 47 AL_PITCH = 0x1003, 48 AL_POSITION = 0x1004, 49 AL_DIRECTION = 0x1005, 50 AL_VELOCITY = 0x1006, 51 AL_LOOPING = 0x1007, 52 AL_BUFFER = 0x1009, 53 AL_GAIN = 0x100A, 54 AL_MIN_GAIN = 0x100D, 55 AL_MAX_GAIN = 0x100E, 56 AL_ORIENTATION = 0x100F, 57 58 AL_CHANNEL_MASK = 0x3000, 59 60 AL_SOURCE_STATE = 0x1010, 61 AL_INITIAL = 0x1011, 62 AL_PLAYING = 0x1012, 63 AL_PAUSED = 0x1013, 64 AL_STOPPED = 0x1014, 65 66 AL_BUFFERS_QUEUED = 0x1015, 67 AL_BUFFERS_PROCESSED = 0x1016, 68 69 AL_REFERENCE_DISTANCE = 0x1020, 70 AL_ROLLOFF_FACTOR = 0x1021, 71 AL_CONE_OUTER_GAIN = 0x1022, 72 AL_MAX_DISTANCE = 0x1023, 73 74 AL_SEC_OFFSET = 0x1024, 75 AL_SAMPLE_OFFSET = 0x1025, 76 AL_BYTE_OFFSET = 0x1026, 77 78 AL_SOURCE_TYPE = 0x1027, 79 AL_STATIC = 0x1028, 80 AL_STREAMING = 0x1029, 81 AL_UNDETERMINED = 0x1030, 82 83 AL_FORMAT_MONO8 = 0x1100, 84 AL_FORMAT_MONO16 = 0x1101, 85 AL_FORMAT_STEREO8 = 0x1102, 86 AL_FORMAT_STEREO16 = 0x1103, 87 88 AL_FREQUENCY = 0x2001, 89 AL_BITS = 0x2002, 90 AL_CHANNELS = 0x2003, 91 AL_SIZE = 0x2004, 92 93 AL_UNUSED = 0x2010, 94 AL_PENDING = 0x2011, 95 AL_PROCESSED = 0x2012, 96 97 AL_NO_ERROR = AL_FALSE, 98 99 AL_INVALID_NAME = 0xA001, 100 AL_INVALID_ENUM = 0xA002, 101 AL_INVALID_VALUE = 0xA003, 102 AL_INVALID_OPERATION = 0xA004, 103 AL_OUT_OF_MEMORY = 0xA005, 104 105 AL_VENDOR = 0xB001, 106 AL_VERSION = 0xB002, 107 AL_RENDERER = 0xB003, 108 AL_EXTENSIONS = 0xB004, 109 110 AL_DOPPLER_FACTOR = 0xC000, 111 AL_DOPPLER_VELOCITY = 0xC001, 112 AL_SPEED_OF_SOUND = 0xC003, 113 114 AL_DISTANCE_MODEL = 0xD000, 115 AL_INVERSE_DISTANCE = 0xD001, 116 AL_INVERSE_DISTANCE_CLAMPED = 0xD002, 117 AL_LINEAR_DISTANCE = 0xD003, 118 AL_LINEAR_DISTANCE_CLAMPED = 0xD004, 119 AL_EXPONENT_DISTANCE = 0xD005, 120 AL_EXPONENT_DISTANCE_CLAMPED = 0xD006, 121 } 122 123 // alc 124 enum ALC_VERSION_0_1 = true; 125 126 alias ALCdevice = void; 127 alias ALCcontext = void; 128 129 alias ALCboolean = byte; 130 alias ALCchar = char; 131 alias ALCbyte = byte; 132 alias ALCubyte = ubyte; 133 alias ALCshort = short; 134 alias ALCushort = ushort; 135 alias ALCint = int; 136 alias ALCuint = uint; 137 alias ALCsizei = int; 138 alias ALCenum = int; 139 alias ALCfloat = float; 140 alias ALCdouble = double; 141 alias ALCvoid = void; 142 143 enum : ALCboolean { 144 ALC_FALSE = 0, 145 ALC_TRUE = 1, 146 } 147 148 enum : ALCenum { 149 ALC_FREQUENCY = 0x1007, 150 ALC_REFRESH = 0x1008, 151 ALC_SYNC = 0x1009, 152 153 ALC_MONO_SOURCES = 0x1010, 154 ALC_STEREO_SOURCES = 0x1011, 155 156 ALC_NO_ERROR = ALC_FALSE, 157 ALC_INVALID_DEVICE = 0xA001, 158 ALC_INVALID_CONTEXT = 0xA002, 159 ALC_INVALID_ENUM = 0xA003, 160 ALC_INVALID_VALUE = 0xA004, 161 ALC_OUT_OF_MEMORY = 0xA005, 162 163 ALC_DEFAULT_DEVICE_SPECIFIER = 0x1004, 164 ALC_DEVICE_SPECIFIER = 0x1005, 165 ALC_EXTENSIONS = 0x1006, 166 167 ALC_MAJOR_VERSION = 0x1000, 168 ALC_MINOR_VERSION = 0x1001, 169 170 ALC_ATTRIBUTES_SIZE = 0x1002, 171 ALC_ALL_ATTRIBUTES = 0x1003, 172 173 ALC_CAPTURE_DEVICE_SPECIFIER = 0x310, 174 ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311, 175 ALC_CAPTURE_SAMPLES = 0x312, 176 } 177 178 // alext 179 enum : ALenum { 180 // AL_LOKI_IMA_ADPCM_format 181 AL_FORMAT_IMA_ADPCM_MONO16_EXT = 0x10000, 182 AL_FORMAT_IMA_ADPCM_STEREO16_EXT = 0x10001, 183 184 // AL_LOKI_WAVE_format 185 AL_FORMAT_WAVE_EXT = 0x10002, 186 187 // AL_EXT_vorbis 188 AL_FORMAT_VORBIS_EXT = 0x10003, 189 190 // AL_LOKI_quadriphonic 191 AL_FORMAT_QUAD8_LOKI = 0x10004, 192 AL_FORMAT_QUAD16_LOKI = 0x10005, 193 194 // AL_EXT_float32 195 AL_FORMAT_MONO_FLOAT32 = 0x10010, 196 AL_FORMAT_STEREO_FLOAT32 = 0x10011, 197 198 // ALC_LOKI_audio_channel 199 ALC_CHAN_MAIN_LOKI = 0x500001, 200 ALC_CHAN_PCM_LOKI = 0x500002, 201 ALC_CHAN_CD_LOKI = 0x500003, 202 203 // ALC_ENUMERATE_ALL_EXT 204 ALC_DEFAULT_ALL_DEVICES_SPECIFIER = 0x1012, 205 ALC_ALL_DEVICES_SPECIFIER = 0x1013, 206 207 // AL_EXT_MCFORMATS 208 AL_FORMAT_QUAD8 = 0x1204, 209 AL_FORMAT_QUAD16 = 0x1205, 210 AL_FORMAT_QUAD32 = 0x1206, 211 AL_FORMAT_REAR8 = 0x1207, 212 AL_FORMAT_REAR16 = 0x1208, 213 AL_FORMAT_REAR32 = 0x1209, 214 AL_FORMAT_51CHN8 = 0x120A, 215 AL_FORMAT_51CHN16 = 0x120B, 216 AL_FORMAT_51CHN32 = 0x120C, 217 AL_FORMAT_61CHN8 = 0x120D, 218 AL_FORMAT_61CHN16 = 0x120E, 219 AL_FORMAT_61CHN32 = 0x120F, 220 AL_FORMAT_71CHN8 = 0x1210, 221 AL_FORMAT_71CHN16 = 0x1211, 222 AL_FORMAT_71CHN32 = 0x1212, 223 224 // AL_EXT_IMA4 225 AL_FORMAT_MONO_IMA4 = 0x1300, 226 AL_FORMAT_STEREO_IMA4 = 0x1301, 227 }