| 1 | #ifndef AL_AL_H |
| 2 | #define AL_AL_H |
| 3 | |
| 4 | #if defined(__cplusplus) |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | #ifndef AL_API |
| 9 | #if defined(AL_LIBTYPE_STATIC) |
| 10 | #define AL_API |
| 11 | #elif defined(_WIN32) |
| 12 | #define AL_API __declspec(dllimport) |
| 13 | #else |
| 14 | #define AL_API extern |
| 15 | #endif |
| 16 | #endif |
| 17 | |
| 18 | #if defined(_WIN32) |
| 19 | #define AL_APIENTRY __cdecl |
| 20 | #else |
| 21 | #define AL_APIENTRY |
| 22 | #endif |
| 23 | |
| 24 | |
| 25 | /** Deprecated macro. */ |
| 26 | #define OPENAL |
| 27 | #define ALAPI AL_API |
| 28 | #define ALAPIENTRY AL_APIENTRY |
| 29 | #define AL_INVALID (-1) |
| 30 | #define AL_ILLEGAL_ENUM AL_INVALID_ENUM |
| 31 | #define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION |
| 32 | |
| 33 | /** Supported AL version. */ |
| 34 | #define AL_VERSION_1_0 |
| 35 | #define AL_VERSION_1_1 |
| 36 | |
| 37 | /** 8-bit boolean */ |
| 38 | typedef char ALboolean; |
| 39 | |
| 40 | /** character */ |
| 41 | typedef char ALchar; |
| 42 | |
| 43 | /** signed 8-bit 2's complement integer */ |
| 44 | typedef signed char ALbyte; |
| 45 | |
| 46 | /** unsigned 8-bit integer */ |
| 47 | typedef unsigned char ALubyte; |
| 48 | |
| 49 | /** signed 16-bit 2's complement integer */ |
| 50 | typedef short ALshort; |
| 51 | |
| 52 | /** unsigned 16-bit integer */ |
| 53 | typedef unsigned short ALushort; |
| 54 | |
| 55 | /** signed 32-bit 2's complement integer */ |
| 56 | typedef int ALint; |
| 57 | |
| 58 | /** unsigned 32-bit integer */ |
| 59 | typedef unsigned int ALuint; |
| 60 | |
| 61 | /** non-negative 32-bit binary integer size */ |
| 62 | typedef int ALsizei; |
| 63 | |
| 64 | /** enumerated 32-bit value */ |
| 65 | typedef int ALenum; |
| 66 | |
| 67 | /** 32-bit IEEE754 floating-point */ |
| 68 | typedef float ALfloat; |
| 69 | |
| 70 | /** 64-bit IEEE754 floating-point */ |
| 71 | typedef double ALdouble; |
| 72 | |
| 73 | /** void type (for opaque pointers only) */ |
| 74 | typedef void ALvoid; |
| 75 | |
| 76 | |
| 77 | /* Enumerant values begin at column 50. No tabs. */ |
| 78 | |
| 79 | /** "no distance model" or "no buffer" */ |
| 80 | #define AL_NONE 0 |
| 81 | |
| 82 | /** Boolean False. */ |
| 83 | #define AL_FALSE 0 |
| 84 | |
| 85 | /** Boolean True. */ |
| 86 | #define AL_TRUE 1 |
| 87 | |
| 88 | |
| 89 | /** |
| 90 | * Relative source. |
| 91 | * Type: ALboolean |
| 92 | * Range: [AL_TRUE, AL_FALSE] |
| 93 | * Default: AL_FALSE |
| 94 | * |
| 95 | * Specifies if the Source has relative coordinates. |
| 96 | */ |
| 97 | #define AL_SOURCE_RELATIVE 0x202 |
| 98 | |
| 99 | |
| 100 | /** |
| 101 | * Inner cone angle, in degrees. |
| 102 | * Type: ALint, ALfloat |
| 103 | * Range: [0 - 360] |
| 104 | * Default: 360 |
| 105 | * |
| 106 | * The angle covered by the inner cone, where the source will not attenuate. |
| 107 | */ |
| 108 | #define AL_CONE_INNER_ANGLE 0x1001 |
| 109 | |
| 110 | /** |
| 111 | * Outer cone angle, in degrees. |
| 112 | * Range: [0 - 360] |
| 113 | * Default: 360 |
| 114 | * |
| 115 | * The angle covered by the outer cone, where the source will be fully |
| 116 | * attenuated. |
| 117 | */ |
| 118 | #define AL_CONE_OUTER_ANGLE 0x1002 |
| 119 | |
| 120 | /** |
| 121 | * Source pitch. |
| 122 | * Type: ALfloat |
| 123 | * Range: [0.5 - 2.0] |
| 124 | * Default: 1.0 |
| 125 | * |
| 126 | * A multiplier for the frequency (sample rate) of the source's buffer. |
| 127 | */ |
| 128 | #define AL_PITCH 0x1003 |
| 129 | |
| 130 | /** |
| 131 | * Source or listener position. |
| 132 | * Type: ALfloat[3], ALint[3] |
| 133 | * Default: {0, 0, 0} |
| 134 | * |
| 135 | * The source or listener location in three dimensional space. |
| 136 | * |
| 137 | * OpenAL, like OpenGL, uses a right handed coordinate system, where in a |
| 138 | * frontal default view X (thumb) points right, Y points up (index finger), and |
| 139 | * Z points towards the viewer/camera (middle finger). |
| 140 | * |
| 141 | * To switch from a left handed coordinate system, flip the sign on the Z |
| 142 | * coordinate. |
| 143 | */ |
| 144 | #define AL_POSITION 0x1004 |
| 145 | |
| 146 | /** |
| 147 | * Source direction. |
| 148 | * Type: ALfloat[3], ALint[3] |
| 149 | * Default: {0, 0, 0} |
| 150 | * |
| 151 | * Specifies the current direction in local space. |
| 152 | * A zero-length vector specifies an omni-directional source (cone is ignored). |
| 153 | */ |
| 154 | #define AL_DIRECTION 0x1005 |
| 155 | |
| 156 | /** |
| 157 | * Source or listener velocity. |
| 158 | * Type: ALfloat[3], ALint[3] |
| 159 | * Default: {0, 0, 0} |
| 160 | * |
| 161 | * Specifies the current velocity in local space. |
| 162 | */ |
| 163 | #define AL_VELOCITY 0x1006 |
| 164 | |
| 165 | /** |
| 166 | * Source looping. |
| 167 | * Type: ALboolean |
| 168 | * Range: [AL_TRUE, AL_FALSE] |
| 169 | * Default: AL_FALSE |
| 170 | * |
| 171 | * Specifies whether source is looping. |
| 172 | */ |
| 173 | #define AL_LOOPING 0x1007 |
| 174 | |
| 175 | /** |
| 176 | * Source buffer. |
| 177 | * Type: ALuint |
| 178 | * Range: any valid Buffer. |
| 179 | * |
| 180 | * Specifies the buffer to provide sound samples. |
| 181 | */ |
| 182 | #define AL_BUFFER 0x1009 |
| 183 | |
| 184 | /** |
| 185 | * Source or listener gain. |
| 186 | * Type: ALfloat |
| 187 | * Range: [0.0 - ] |
| 188 | * |
| 189 | * A value of 1.0 means unattenuated. Each division by 2 equals an attenuation |
| 190 | * of about -6dB. Each multiplicaton by 2 equals an amplification of about |
| 191 | * +6dB. |
| 192 | * |
| 193 | * A value of 0.0 is meaningless with respect to a logarithmic scale; it is |
| 194 | * silent. |
| 195 | */ |
| 196 | #define AL_GAIN 0x100A |
| 197 | |
| 198 | /** |
| 199 | * Minimum source gain. |
| 200 | * Type: ALfloat |
| 201 | * Range: [0.0 - 1.0] |
| 202 | * |
| 203 | * The minimum gain allowed for a source, after distance and cone attenation is |
| 204 | * applied (if applicable). |
| 205 | */ |
| 206 | #define AL_MIN_GAIN 0x100D |
| 207 | |
| 208 | /** |
| 209 | * Maximum source gain. |
| 210 | * Type: ALfloat |
| 211 | * Range: [0.0 - 1.0] |
| 212 | * |
| 213 | * The maximum gain allowed for a source, after distance and cone attenation is |
| 214 | * applied (if applicable). |
| 215 | */ |
| 216 | #define AL_MAX_GAIN 0x100E |
| 217 | |
| 218 | /** |
| 219 | * Listener orientation. |
| 220 | * Type: ALfloat[6] |
| 221 | * Default: {0.0, 0.0, -1.0, 0.0, 1.0, 0.0} |
| 222 | * |
| 223 | * Effectively two three dimensional vectors. The first vector is the front (or |
| 224 | * "at") and the second is the top (or "up"). |
| 225 | * |
| 226 | * Both vectors are in local space. |
| 227 | */ |
| 228 | #define AL_ORIENTATION 0x100F |
| 229 | |
| 230 | /** |
| 231 | * Source state (query only). |
| 232 | * Type: ALint |
| 233 | * Range: [AL_INITIAL, AL_PLAYING, AL_PAUSED, AL_STOPPED] |
| 234 | */ |
| 235 | #define AL_SOURCE_STATE 0x1010 |
| 236 | |
| 237 | /** Source state value. */ |
| 238 | #define AL_INITIAL 0x1011 |
| 239 | #define AL_PLAYING 0x1012 |
| 240 | #define AL_PAUSED 0x1013 |
| 241 | #define AL_STOPPED 0x1014 |
| 242 | |
| 243 | /** |
| 244 | * Source Buffer Queue size (query only). |
| 245 | * Type: ALint |
| 246 | * |
| 247 | * The number of buffers queued using alSourceQueueBuffers, minus the buffers |
| 248 | * removed with alSourceUnqueueBuffers. |
| 249 | */ |
| 250 | #define AL_BUFFERS_QUEUED 0x1015 |
| 251 | |
| 252 | /** |
| 253 | * Source Buffer Queue processed count (query only). |
| 254 | * Type: ALint |
| 255 | * |
| 256 | * The number of queued buffers that have been fully processed, and can be |
| 257 | * removed with alSourceUnqueueBuffers. |
| 258 | * |
| 259 | * Looping sources will never fully process buffers because they will be set to |
| 260 | * play again for when the source loops. |
| 261 | */ |
| 262 | #define AL_BUFFERS_PROCESSED 0x1016 |
| 263 | |
| 264 | /** |
| 265 | * Source reference distance. |
| 266 | * Type: ALfloat |
| 267 | * Range: [0.0 - ] |
| 268 | * Default: 1.0 |
| 269 | * |
| 270 | * The distance in units that no attenuation occurs. |
| 271 | * |
| 272 | * At 0.0, no distance attenuation ever occurs on non-linear attenuation models. |
| 273 | */ |
| 274 | #define AL_REFERENCE_DISTANCE 0x1020 |
| 275 | |
| 276 | /** |
| 277 | * Source rolloff factor. |
| 278 | * Type: ALfloat |
| 279 | * Range: [0.0 - ] |
| 280 | * Default: 1.0 |
| 281 | * |
| 282 | * Multiplier to exaggerate or diminish distance attenuation. |
| 283 | * |
| 284 | * At 0.0, no distance attenuation ever occurs. |
| 285 | */ |
| 286 | #define AL_ROLLOFF_FACTOR 0x1021 |
| 287 | |
| 288 | /** |
| 289 | * Outer cone gain. |
| 290 | * Type: ALfloat |
| 291 | * Range: [0.0 - 1.0] |
| 292 | * Default: 0.0 |
| 293 | * |
| 294 | * The gain attenuation applied when the listener is outside of the source's |
| 295 | * outer cone. |
| 296 | */ |
| 297 | #define AL_CONE_OUTER_GAIN 0x1022 |
| 298 | |
| 299 | /** |
| 300 | * Source maximum distance. |
| 301 | * Type: ALfloat |
| 302 | * Range: [0.0 - ] |
| 303 | * Default: +inf |
| 304 | * |
| 305 | * The distance above which the source is not attenuated any further with a |
| 306 | * clamped distance model, or where attenuation reaches 0.0 gain for linear |
| 307 | * distance models with a default rolloff factor. |
| 308 | */ |
| 309 | #define AL_MAX_DISTANCE 0x1023 |
| 310 | |
| 311 | /** Source buffer position, in seconds */ |
| 312 | #define AL_SEC_OFFSET 0x1024 |
| 313 | /** Source buffer position, in sample frames */ |
| 314 | #define AL_SAMPLE_OFFSET 0x1025 |
| 315 | /** Source buffer position, in bytes */ |
| 316 | #define AL_BYTE_OFFSET 0x1026 |
| 317 | |
| 318 | /** |
| 319 | * Source type (query only). |
| 320 | * Type: ALint |
| 321 | * Range: [AL_STATIC, AL_STREAMING, AL_UNDETERMINED] |
| 322 | * |
| 323 | * A Source is Static if a Buffer has been attached using AL_BUFFER. |
| 324 | * |
| 325 | * A Source is Streaming if one or more Buffers have been attached using |
| 326 | * alSourceQueueBuffers. |
| 327 | * |
| 328 | * A Source is Undetermined when it has the NULL buffer attached using |
| 329 | * AL_BUFFER. |
| 330 | */ |
| 331 | #define AL_SOURCE_TYPE 0x1027 |
| 332 | |
| 333 | /** Source type value. */ |
| 334 | #define AL_STATIC 0x1028 |
| 335 | #define AL_STREAMING 0x1029 |
| 336 | #define AL_UNDETERMINED 0x1030 |
| 337 | |
| 338 | /** Buffer format specifier. */ |
| 339 | #define AL_FORMAT_MONO8 0x1100 |
| 340 | #define AL_FORMAT_MONO16 0x1101 |
| 341 | #define AL_FORMAT_STEREO8 0x1102 |
| 342 | #define AL_FORMAT_STEREO16 0x1103 |
| 343 | |
| 344 | /** Buffer frequency (query only). */ |
| 345 | #define AL_FREQUENCY 0x2001 |
| 346 | /** Buffer bits per sample (query only). */ |
| 347 | #define AL_BITS 0x2002 |
| 348 | /** Buffer channel count (query only). */ |
| 349 | #define AL_CHANNELS 0x2003 |
| 350 | /** Buffer data size (query only). */ |
| 351 | #define AL_SIZE 0x2004 |
| 352 | |
| 353 | /** |
| 354 | * Buffer state. |
| 355 | * |
| 356 | * Not for public use. |
| 357 | */ |
| 358 | #define AL_UNUSED 0x2010 |
| 359 | #define AL_PENDING 0x2011 |
| 360 | #define AL_PROCESSED 0x2012 |
| 361 | |
| 362 | |
| 363 | /** No error. */ |
| 364 | #define AL_NO_ERROR 0 |
| 365 | |
| 366 | /** Invalid name paramater passed to AL call. */ |
| 367 | #define AL_INVALID_NAME 0xA001 |
| 368 | |
| 369 | /** Invalid enum parameter passed to AL call. */ |
| 370 | #define AL_INVALID_ENUM 0xA002 |
| 371 | |
| 372 | /** Invalid value parameter passed to AL call. */ |
| 373 | #define AL_INVALID_VALUE 0xA003 |
| 374 | |
| 375 | /** Illegal AL call. */ |
| 376 | #define AL_INVALID_OPERATION 0xA004 |
| 377 | |
| 378 | /** Not enough memory. */ |
| 379 | #define AL_OUT_OF_MEMORY 0xA005 |
| 380 | |
| 381 | |
| 382 | /** Context string: Vendor ID. */ |
| 383 | #define AL_VENDOR 0xB001 |
| 384 | /** Context string: Version. */ |
| 385 | #define AL_VERSION 0xB002 |
| 386 | /** Context string: Renderer ID. */ |
| 387 | #define AL_RENDERER 0xB003 |
| 388 | /** Context string: Space-separated extension list. */ |
| 389 | #define AL_EXTENSIONS 0xB004 |
| 390 | |
| 391 | |
| 392 | /** |
| 393 | * Doppler scale. |
| 394 | * Type: ALfloat |
| 395 | * Range: [0.0 - ] |
| 396 | * Default: 1.0 |
| 397 | * |
| 398 | * Scale for source and listener velocities. |
| 399 | */ |
| 400 | #define AL_DOPPLER_FACTOR 0xC000 |
| 401 | AL_API void AL_APIENTRY alDopplerFactor(ALfloat value); |
| 402 | |
| 403 | /** |
| 404 | * Doppler velocity (deprecated). |
| 405 | * |
| 406 | * A multiplier applied to the Speed of Sound. |
| 407 | */ |
| 408 | #define AL_DOPPLER_VELOCITY 0xC001 |
| 409 | AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value); |
| 410 | |
| 411 | /** |
| 412 | * Speed of Sound, in units per second. |
| 413 | * Type: ALfloat |
| 414 | * Range: [0.0001 - ] |
| 415 | * Default: 343.3 |
| 416 | * |
| 417 | * The speed at which sound waves are assumed to travel, when calculating the |
| 418 | * doppler effect. |
| 419 | */ |
| 420 | #define AL_SPEED_OF_SOUND 0xC003 |
| 421 | AL_API void AL_APIENTRY alSpeedOfSound(ALfloat value); |
| 422 | |
| 423 | /** |
| 424 | * Distance attenuation model. |
| 425 | * Type: ALint |
| 426 | * Range: [AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED, |
| 427 | * AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED, |
| 428 | * AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED] |
| 429 | * Default: AL_INVERSE_DISTANCE_CLAMPED |
| 430 | * |
| 431 | * The model by which sources attenuate with distance. |
| 432 | * |
| 433 | * None - No distance attenuation. |
| 434 | * Inverse - Doubling the distance halves the source gain. |
| 435 | * Linear - Linear gain scaling between the reference and max distances. |
| 436 | * Exponent - Exponential gain dropoff. |
| 437 | * |
| 438 | * Clamped variations work like the non-clamped counterparts, except the |
| 439 | * distance calculated is clamped between the reference and max distances. |
| 440 | */ |
| 441 | #define AL_DISTANCE_MODEL 0xD000 |
| 442 | AL_API void AL_APIENTRY alDistanceModel(ALenum distanceModel); |
| 443 | |
| 444 | /** Distance model value. */ |
| 445 | #define AL_INVERSE_DISTANCE 0xD001 |
| 446 | #define AL_INVERSE_DISTANCE_CLAMPED 0xD002 |
| 447 | #define AL_LINEAR_DISTANCE 0xD003 |
| 448 | #define AL_LINEAR_DISTANCE_CLAMPED 0xD004 |
| 449 | #define AL_EXPONENT_DISTANCE 0xD005 |
| 450 | #define AL_EXPONENT_DISTANCE_CLAMPED 0xD006 |
| 451 | |
| 452 | /** Renderer State management. */ |
| 453 | AL_API void AL_APIENTRY alEnable(ALenum capability); |
| 454 | AL_API void AL_APIENTRY alDisable(ALenum capability); |
| 455 | AL_API ALboolean AL_APIENTRY alIsEnabled(ALenum capability); |
| 456 | |
| 457 | /** State retrieval. */ |
| 458 | AL_API const ALchar* AL_APIENTRY alGetString(ALenum param); |
| 459 | AL_API void AL_APIENTRY alGetBooleanv(ALenum param, ALboolean *values); |
| 460 | AL_API void AL_APIENTRY alGetIntegerv(ALenum param, ALint *values); |
| 461 | AL_API void AL_APIENTRY alGetFloatv(ALenum param, ALfloat *values); |
| 462 | AL_API void AL_APIENTRY alGetDoublev(ALenum param, ALdouble *values); |
| 463 | AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum param); |
| 464 | AL_API ALint AL_APIENTRY alGetInteger(ALenum param); |
| 465 | AL_API ALfloat AL_APIENTRY alGetFloat(ALenum param); |
| 466 | AL_API ALdouble AL_APIENTRY alGetDouble(ALenum param); |
| 467 | |
| 468 | /** |
| 469 | * Error retrieval. |
| 470 | * |
| 471 | * Obtain the first error generated in the AL context since the last check. |
| 472 | */ |
| 473 | AL_API ALenum AL_APIENTRY alGetError(void); |
| 474 | |
| 475 | /** |
| 476 | * Extension support. |
| 477 | * |
| 478 | * Query for the presence of an extension, and obtain any appropriate function |
| 479 | * pointers and enum values. |
| 480 | */ |
| 481 | AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname); |
| 482 | AL_API void* AL_APIENTRY alGetProcAddress(const ALchar *fname); |
| 483 | AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename); |
| 484 | |
| 485 | |
| 486 | /** Set Listener parameters */ |
| 487 | AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value); |
| 488 | AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); |
| 489 | AL_API void AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values); |
| 490 | AL_API void AL_APIENTRY alListeneri(ALenum param, ALint value); |
| 491 | AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, ALint value3); |
| 492 | AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values); |
| 493 | |
| 494 | /** Get Listener parameters */ |
| 495 | AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value); |
| 496 | AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); |
| 497 | AL_API void AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values); |
| 498 | AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value); |
| 499 | AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3); |
| 500 | AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint *values); |
| 501 | |
| 502 | |
| 503 | /** Create Source objects. */ |
| 504 | AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources); |
| 505 | /** Delete Source objects. */ |
| 506 | AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources); |
| 507 | /** Verify a handle is a valid Source. */ |
| 508 | AL_API ALboolean AL_APIENTRY alIsSource(ALuint source); |
| 509 | |
| 510 | /** Set Source parameters. */ |
| 511 | AL_API void AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value); |
| 512 | AL_API void AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); |
| 513 | AL_API void AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat *values); |
| 514 | AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value); |
| 515 | AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3); |
| 516 | AL_API void AL_APIENTRY alSourceiv(ALuint source, ALenum param, const ALint *values); |
| 517 | |
| 518 | /** Get Source parameters. */ |
| 519 | AL_API void AL_APIENTRY alGetSourcef(ALuint source, ALenum param, ALfloat *value); |
| 520 | AL_API void AL_APIENTRY alGetSource3f(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); |
| 521 | AL_API void AL_APIENTRY alGetSourcefv(ALuint source, ALenum param, ALfloat *values); |
| 522 | AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value); |
| 523 | AL_API void AL_APIENTRY alGetSource3i(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3); |
| 524 | AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum param, ALint *values); |
| 525 | |
| 526 | |
| 527 | /** Play, replay, or resume (if paused) a list of Sources */ |
| 528 | AL_API void AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources); |
| 529 | /** Stop a list of Sources */ |
| 530 | AL_API void AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources); |
| 531 | /** Rewind a list of Sources */ |
| 532 | AL_API void AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources); |
| 533 | /** Pause a list of Sources */ |
| 534 | AL_API void AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources); |
| 535 | |
| 536 | /** Play, replay, or resume a Source */ |
| 537 | AL_API void AL_APIENTRY alSourcePlay(ALuint source); |
| 538 | /** Stop a Source */ |
| 539 | AL_API void AL_APIENTRY alSourceStop(ALuint source); |
| 540 | /** Rewind a Source (set playback postiton to beginning) */ |
| 541 | AL_API void AL_APIENTRY alSourceRewind(ALuint source); |
| 542 | /** Pause a Source */ |
| 543 | AL_API void AL_APIENTRY alSourcePause(ALuint source); |
| 544 | |
| 545 | /** Queue buffers onto a source */ |
| 546 | AL_API void AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei nb, const ALuint *buffers); |
| 547 | /** Unqueue processed buffers from a source */ |
| 548 | AL_API void AL_APIENTRY alSourceUnqueueBuffers(ALuint source, ALsizei nb, ALuint *buffers); |
| 549 | |
| 550 | |
| 551 | /** Create Buffer objects */ |
| 552 | AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers); |
| 553 | /** Delete Buffer objects */ |
| 554 | AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers); |
| 555 | /** Verify a handle is a valid Buffer */ |
| 556 | AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer); |
| 557 | |
| 558 | /** Specifies the data to be copied into a buffer */ |
| 559 | AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq); |
| 560 | |
| 561 | /** Set Buffer parameters, */ |
| 562 | AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat value); |
| 563 | AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); |
| 564 | AL_API void AL_APIENTRY alBufferfv(ALuint buffer, ALenum param, const ALfloat *values); |
| 565 | AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value); |
| 566 | AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3); |
| 567 | AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *values); |
| 568 | |
| 569 | /** Get Buffer parameters. */ |
| 570 | AL_API void AL_APIENTRY alGetBufferf(ALuint buffer, ALenum param, ALfloat *value); |
| 571 | AL_API void AL_APIENTRY alGetBuffer3f(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); |
| 572 | AL_API void AL_APIENTRY alGetBufferfv(ALuint buffer, ALenum param, ALfloat *values); |
| 573 | AL_API void AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value); |
| 574 | AL_API void AL_APIENTRY alGetBuffer3i(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3); |
| 575 | AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum param, ALint *values); |
| 576 | |
| 577 | /** Pointer-to-function type, useful for dynamically getting AL entry points. */ |
| 578 | typedef void (AL_APIENTRY *LPALENABLE)(ALenum capability); |
| 579 | typedef void (AL_APIENTRY *LPALDISABLE)(ALenum capability); |
| 580 | typedef ALboolean (AL_APIENTRY *LPALISENABLED)(ALenum capability); |
| 581 | typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)(ALenum param); |
| 582 | typedef void (AL_APIENTRY *LPALGETBOOLEANV)(ALenum param, ALboolean *values); |
| 583 | typedef void (AL_APIENTRY *LPALGETINTEGERV)(ALenum param, ALint *values); |
| 584 | typedef void (AL_APIENTRY *LPALGETFLOATV)(ALenum param, ALfloat *values); |
| 585 | typedef void (AL_APIENTRY *LPALGETDOUBLEV)(ALenum param, ALdouble *values); |
| 586 | typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)(ALenum param); |
| 587 | typedef ALint (AL_APIENTRY *LPALGETINTEGER)(ALenum param); |
| 588 | typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)(ALenum param); |
| 589 | typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)(ALenum param); |
| 590 | typedef ALenum (AL_APIENTRY *LPALGETERROR)(void); |
| 591 | typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar *extname); |
| 592 | typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)(const ALchar *fname); |
| 593 | typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)(const ALchar *ename); |
| 594 | typedef void (AL_APIENTRY *LPALLISTENERF)(ALenum param, ALfloat value); |
| 595 | typedef void (AL_APIENTRY *LPALLISTENER3F)(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); |
| 596 | typedef void (AL_APIENTRY *LPALLISTENERFV)(ALenum param, const ALfloat *values); |
| 597 | typedef void (AL_APIENTRY *LPALLISTENERI)(ALenum param, ALint value); |
| 598 | typedef void (AL_APIENTRY *LPALLISTENER3I)(ALenum param, ALint value1, ALint value2, ALint value3); |
| 599 | typedef void (AL_APIENTRY *LPALLISTENERIV)(ALenum param, const ALint *values); |
| 600 | typedef void (AL_APIENTRY *LPALGETLISTENERF)(ALenum param, ALfloat *value); |
| 601 | typedef void (AL_APIENTRY *LPALGETLISTENER3F)(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); |
| 602 | typedef void (AL_APIENTRY *LPALGETLISTENERFV)(ALenum param, ALfloat *values); |
| 603 | typedef void (AL_APIENTRY *LPALGETLISTENERI)(ALenum param, ALint *value); |
| 604 | typedef void (AL_APIENTRY *LPALGETLISTENER3I)(ALenum param, ALint *value1, ALint *value2, ALint *value3); |
| 605 | typedef void (AL_APIENTRY *LPALGETLISTENERIV)(ALenum param, ALint *values); |
| 606 | typedef void (AL_APIENTRY *LPALGENSOURCES)(ALsizei n, ALuint *sources); |
| 607 | typedef void (AL_APIENTRY *LPALDELETESOURCES)(ALsizei n, const ALuint *sources); |
| 608 | typedef ALboolean (AL_APIENTRY *LPALISSOURCE)(ALuint source); |
| 609 | typedef void (AL_APIENTRY *LPALSOURCEF)(ALuint source, ALenum param, ALfloat value); |
| 610 | typedef void (AL_APIENTRY *LPALSOURCE3F)(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); |
| 611 | typedef void (AL_APIENTRY *LPALSOURCEFV)(ALuint source, ALenum param, const ALfloat *values); |
| 612 | typedef void (AL_APIENTRY *LPALSOURCEI)(ALuint source, ALenum param, ALint value); |
| 613 | typedef void (AL_APIENTRY *LPALSOURCE3I)(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3); |
| 614 | typedef void (AL_APIENTRY *LPALSOURCEIV)(ALuint source, ALenum param, const ALint *values); |
| 615 | typedef void (AL_APIENTRY *LPALGETSOURCEF)(ALuint source, ALenum param, ALfloat *value); |
| 616 | typedef void (AL_APIENTRY *LPALGETSOURCE3F)(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); |
| 617 | typedef void (AL_APIENTRY *LPALGETSOURCEFV)(ALuint source, ALenum param, ALfloat *values); |
| 618 | typedef void (AL_APIENTRY *LPALGETSOURCEI)(ALuint source, ALenum param, ALint *value); |
| 619 | typedef void (AL_APIENTRY *LPALGETSOURCE3I)(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3); |
| 620 | typedef void (AL_APIENTRY *LPALGETSOURCEIV)(ALuint source, ALenum param, ALint *values); |
| 621 | typedef void (AL_APIENTRY *LPALSOURCEPLAYV)(ALsizei n, const ALuint *sources); |
| 622 | typedef void (AL_APIENTRY *LPALSOURCESTOPV)(ALsizei n, const ALuint *sources); |
| 623 | typedef void (AL_APIENTRY *LPALSOURCEREWINDV)(ALsizei n, const ALuint *sources); |
| 624 | typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)(ALsizei n, const ALuint *sources); |
| 625 | typedef void (AL_APIENTRY *LPALSOURCEPLAY)(ALuint source); |
| 626 | typedef void (AL_APIENTRY *LPALSOURCESTOP)(ALuint source); |
| 627 | typedef void (AL_APIENTRY *LPALSOURCEREWIND)(ALuint source); |
| 628 | typedef void (AL_APIENTRY *LPALSOURCEPAUSE)(ALuint source); |
| 629 | typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint source, ALsizei nb, const ALuint *buffers); |
| 630 | typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint source, ALsizei nb, ALuint *buffers); |
| 631 | typedef void (AL_APIENTRY *LPALGENBUFFERS)(ALsizei n, ALuint *buffers); |
| 632 | typedef void (AL_APIENTRY *LPALDELETEBUFFERS)(ALsizei n, const ALuint *buffers); |
| 633 | typedef ALboolean (AL_APIENTRY *LPALISBUFFER)(ALuint buffer); |
| 634 | typedef void (AL_APIENTRY *LPALBUFFERDATA)(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq); |
| 635 | typedef void (AL_APIENTRY *LPALBUFFERF)(ALuint buffer, ALenum param, ALfloat value); |
| 636 | typedef void (AL_APIENTRY *LPALBUFFER3F)(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); |
| 637 | typedef void (AL_APIENTRY *LPALBUFFERFV)(ALuint buffer, ALenum param, const ALfloat *values); |
| 638 | typedef void (AL_APIENTRY *LPALBUFFERI)(ALuint buffer, ALenum param, ALint value); |
| 639 | typedef void (AL_APIENTRY *LPALBUFFER3I)(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3); |
| 640 | typedef void (AL_APIENTRY *LPALBUFFERIV)(ALuint buffer, ALenum param, const ALint *values); |
| 641 | typedef void (AL_APIENTRY *LPALGETBUFFERF)(ALuint buffer, ALenum param, ALfloat *value); |
| 642 | typedef void (AL_APIENTRY *LPALGETBUFFER3F)(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); |
| 643 | typedef void (AL_APIENTRY *LPALGETBUFFERFV)(ALuint buffer, ALenum param, ALfloat *values); |
| 644 | typedef void (AL_APIENTRY *LPALGETBUFFERI)(ALuint buffer, ALenum param, ALint *value); |
| 645 | typedef void (AL_APIENTRY *LPALGETBUFFER3I)(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3); |
| 646 | typedef void (AL_APIENTRY *LPALGETBUFFERIV)(ALuint buffer, ALenum param, ALint *values); |
| 647 | typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)(ALfloat value); |
| 648 | typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)(ALfloat value); |
| 649 | typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)(ALfloat value); |
| 650 | typedef void (AL_APIENTRY *LPALDISTANCEMODEL)(ALenum distanceModel); |
| 651 | |
| 652 | #if defined(__cplusplus) |
| 653 | } /* extern "C" */ |
| 654 | #endif |
| 655 | |
| 656 | #endif /* AL_AL_H */ |
| 657 | |