Mercurial > audio-send
diff include/AL/al.h @ 0:f9476ff7637e
initial forking of open-al to create multiple listeners
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 25 Oct 2011 13:02:31 -0700 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/include/AL/al.h Tue Oct 25 13:02:31 2011 -0700 1.3 @@ -0,0 +1,718 @@ 1.4 +#ifndef AL_AL_H 1.5 +#define AL_AL_H 1.6 + 1.7 +#if defined(__cplusplus) 1.8 +extern "C" { 1.9 +#endif 1.10 + 1.11 +#ifndef AL_API 1.12 + #if defined(AL_LIBTYPE_STATIC) 1.13 + #define AL_API 1.14 + #elif defined(_WIN32) 1.15 + #define AL_API __declspec(dllimport) 1.16 + #else 1.17 + #define AL_API extern 1.18 + #endif 1.19 +#endif 1.20 + 1.21 +#if defined(_WIN32) 1.22 + #define AL_APIENTRY __cdecl 1.23 +#else 1.24 + #define AL_APIENTRY 1.25 +#endif 1.26 + 1.27 +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC 1.28 + #pragma export on 1.29 +#endif 1.30 + 1.31 +/* 1.32 + * The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and 1.33 + * AL_ILLEGAL_COMMAND macros are deprecated, but are included for 1.34 + * applications porting code from AL 1.0 1.35 + */ 1.36 +#define OPENAL 1.37 +#define ALAPI AL_API 1.38 +#define ALAPIENTRY AL_APIENTRY 1.39 +#define AL_INVALID (-1) 1.40 +#define AL_ILLEGAL_ENUM AL_INVALID_ENUM 1.41 +#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION 1.42 + 1.43 +#define AL_VERSION_1_0 1.44 +#define AL_VERSION_1_1 1.45 + 1.46 + 1.47 +/** 8-bit boolean */ 1.48 +typedef char ALboolean; 1.49 + 1.50 +/** character */ 1.51 +typedef char ALchar; 1.52 + 1.53 +/** signed 8-bit 2's complement integer */ 1.54 +typedef signed char ALbyte; 1.55 + 1.56 +/** unsigned 8-bit integer */ 1.57 +typedef unsigned char ALubyte; 1.58 + 1.59 +/** signed 16-bit 2's complement integer */ 1.60 +typedef short ALshort; 1.61 + 1.62 +/** unsigned 16-bit integer */ 1.63 +typedef unsigned short ALushort; 1.64 + 1.65 +/** signed 32-bit 2's complement integer */ 1.66 +typedef int ALint; 1.67 + 1.68 +/** unsigned 32-bit integer */ 1.69 +typedef unsigned int ALuint; 1.70 + 1.71 +/** non-negative 32-bit binary integer size */ 1.72 +typedef int ALsizei; 1.73 + 1.74 +/** enumerated 32-bit value */ 1.75 +typedef int ALenum; 1.76 + 1.77 +/** 32-bit IEEE754 floating-point */ 1.78 +typedef float ALfloat; 1.79 + 1.80 +/** 64-bit IEEE754 floating-point */ 1.81 +typedef double ALdouble; 1.82 + 1.83 +/** void type (for opaque pointers only) */ 1.84 +typedef void ALvoid; 1.85 + 1.86 + 1.87 +/* Enumerant values begin at column 50. No tabs. */ 1.88 + 1.89 +/* "no distance model" or "no buffer" */ 1.90 +#define AL_NONE 0 1.91 + 1.92 +/* Boolean False. */ 1.93 +#define AL_FALSE 0 1.94 + 1.95 +/** Boolean True. */ 1.96 +#define AL_TRUE 1 1.97 + 1.98 +/** Indicate Source has relative coordinates. */ 1.99 +#define AL_SOURCE_RELATIVE 0x202 1.100 + 1.101 + 1.102 + 1.103 +/** 1.104 + * Directional source, inner cone angle, in degrees. 1.105 + * Range: [0-360] 1.106 + * Default: 360 1.107 + */ 1.108 +#define AL_CONE_INNER_ANGLE 0x1001 1.109 + 1.110 +/** 1.111 + * Directional source, outer cone angle, in degrees. 1.112 + * Range: [0-360] 1.113 + * Default: 360 1.114 + */ 1.115 +#define AL_CONE_OUTER_ANGLE 0x1002 1.116 + 1.117 +/** 1.118 + * Specify the pitch to be applied at source. 1.119 + * Range: [0.5-2.0] 1.120 + * Default: 1.0 1.121 + */ 1.122 +#define AL_PITCH 0x1003 1.123 + 1.124 +/** 1.125 + * Specify the current location in three dimensional space. 1.126 + * OpenAL, like OpenGL, uses a right handed coordinate system, 1.127 + * where in a frontal default view X (thumb) points right, 1.128 + * Y points up (index finger), and Z points towards the 1.129 + * viewer/camera (middle finger). 1.130 + * To switch from a left handed coordinate system, flip the 1.131 + * sign on the Z coordinate. 1.132 + * Listener position is always in the world coordinate system. 1.133 + */ 1.134 +#define AL_POSITION 0x1004 1.135 + 1.136 +/** Specify the current direction. */ 1.137 +#define AL_DIRECTION 0x1005 1.138 + 1.139 +/** Specify the current velocity in three dimensional space. */ 1.140 +#define AL_VELOCITY 0x1006 1.141 + 1.142 +/** 1.143 + * Indicate whether source is looping. 1.144 + * Type: ALboolean? 1.145 + * Range: [AL_TRUE, AL_FALSE] 1.146 + * Default: FALSE. 1.147 + */ 1.148 +#define AL_LOOPING 0x1007 1.149 + 1.150 +/** 1.151 + * Indicate the buffer to provide sound samples. 1.152 + * Type: ALuint. 1.153 + * Range: any valid Buffer id. 1.154 + */ 1.155 +#define AL_BUFFER 0x1009 1.156 + 1.157 +/** 1.158 + * Indicate the gain (volume amplification) applied. 1.159 + * Type: ALfloat. 1.160 + * Range: ]0.0- ] 1.161 + * A value of 1.0 means un-attenuated/unchanged. 1.162 + * Each division by 2 equals an attenuation of -6dB. 1.163 + * Each multiplicaton with 2 equals an amplification of +6dB. 1.164 + * A value of 0.0 is meaningless with respect to a logarithmic 1.165 + * scale; it is interpreted as zero volume - the channel 1.166 + * is effectively disabled. 1.167 + */ 1.168 +#define AL_GAIN 0x100A 1.169 + 1.170 +/* 1.171 + * Indicate minimum source attenuation 1.172 + * Type: ALfloat 1.173 + * Range: [0.0 - 1.0] 1.174 + * 1.175 + * Logarthmic 1.176 + */ 1.177 +#define AL_MIN_GAIN 0x100D 1.178 + 1.179 +/** 1.180 + * Indicate maximum source attenuation 1.181 + * Type: ALfloat 1.182 + * Range: [0.0 - 1.0] 1.183 + * 1.184 + * Logarthmic 1.185 + */ 1.186 +#define AL_MAX_GAIN 0x100E 1.187 + 1.188 +/** 1.189 + * Indicate listener orientation. 1.190 + * 1.191 + * at/up 1.192 + */ 1.193 +#define AL_ORIENTATION 0x100F 1.194 + 1.195 +/** 1.196 + * Source state information. 1.197 + */ 1.198 +#define AL_SOURCE_STATE 0x1010 1.199 +#define AL_INITIAL 0x1011 1.200 +#define AL_PLAYING 0x1012 1.201 +#define AL_PAUSED 0x1013 1.202 +#define AL_STOPPED 0x1014 1.203 + 1.204 +/** 1.205 + * Buffer Queue params 1.206 + */ 1.207 +#define AL_BUFFERS_QUEUED 0x1015 1.208 +#define AL_BUFFERS_PROCESSED 0x1016 1.209 + 1.210 +/** 1.211 + * Source buffer position information 1.212 + */ 1.213 +#define AL_SEC_OFFSET 0x1024 1.214 +#define AL_SAMPLE_OFFSET 0x1025 1.215 +#define AL_BYTE_OFFSET 0x1026 1.216 + 1.217 +/* 1.218 + * Source type (Static, Streaming or undetermined) 1.219 + * Source is Static if a Buffer has been attached using AL_BUFFER 1.220 + * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers 1.221 + * Source is undetermined when it has the NULL buffer attached 1.222 + */ 1.223 +#define AL_SOURCE_TYPE 0x1027 1.224 +#define AL_STATIC 0x1028 1.225 +#define AL_STREAMING 0x1029 1.226 +#define AL_UNDETERMINED 0x1030 1.227 + 1.228 +/** Sound samples: format specifier. */ 1.229 +#define AL_FORMAT_MONO8 0x1100 1.230 +#define AL_FORMAT_MONO16 0x1101 1.231 +#define AL_FORMAT_STEREO8 0x1102 1.232 +#define AL_FORMAT_STEREO16 0x1103 1.233 + 1.234 +/** 1.235 + * source specific reference distance 1.236 + * Type: ALfloat 1.237 + * Range: 0.0 - +inf 1.238 + * 1.239 + * At 0.0, no distance attenuation occurs. Default is 1.240 + * 1.0. 1.241 + */ 1.242 +#define AL_REFERENCE_DISTANCE 0x1020 1.243 + 1.244 +/** 1.245 + * source specific rolloff factor 1.246 + * Type: ALfloat 1.247 + * Range: 0.0 - +inf 1.248 + * 1.249 + */ 1.250 +#define AL_ROLLOFF_FACTOR 0x1021 1.251 + 1.252 +/** 1.253 + * Directional source, outer cone gain. 1.254 + * 1.255 + * Default: 0.0 1.256 + * Range: [0.0 - 1.0] 1.257 + * Logarithmic 1.258 + */ 1.259 +#define AL_CONE_OUTER_GAIN 0x1022 1.260 + 1.261 +/** 1.262 + * Indicate distance above which sources are not 1.263 + * attenuated using the inverse clamped distance model. 1.264 + * 1.265 + * Default: +inf 1.266 + * Type: ALfloat 1.267 + * Range: 0.0 - +inf 1.268 + */ 1.269 +#define AL_MAX_DISTANCE 0x1023 1.270 + 1.271 +/** 1.272 + * Sound samples: frequency, in units of Hertz [Hz]. 1.273 + * This is the number of samples per second. Half of the 1.274 + * sample frequency marks the maximum significant 1.275 + * frequency component. 1.276 + */ 1.277 +#define AL_FREQUENCY 0x2001 1.278 +#define AL_BITS 0x2002 1.279 +#define AL_CHANNELS 0x2003 1.280 +#define AL_SIZE 0x2004 1.281 + 1.282 +/** 1.283 + * Buffer state. 1.284 + * 1.285 + * Not supported for public use (yet). 1.286 + */ 1.287 +#define AL_UNUSED 0x2010 1.288 +#define AL_PENDING 0x2011 1.289 +#define AL_PROCESSED 0x2012 1.290 + 1.291 + 1.292 +/** Errors: No Error. */ 1.293 +#define AL_NO_ERROR AL_FALSE 1.294 + 1.295 +/** 1.296 + * Invalid Name paramater passed to AL call. 1.297 + */ 1.298 +#define AL_INVALID_NAME 0xA001 1.299 + 1.300 +/** 1.301 + * Invalid parameter passed to AL call. 1.302 + */ 1.303 +#define AL_INVALID_ENUM 0xA002 1.304 + 1.305 +/** 1.306 + * Invalid enum parameter value. 1.307 + */ 1.308 +#define AL_INVALID_VALUE 0xA003 1.309 + 1.310 +/** 1.311 + * Illegal call. 1.312 + */ 1.313 +#define AL_INVALID_OPERATION 0xA004 1.314 + 1.315 + 1.316 +/** 1.317 + * No mojo. 1.318 + */ 1.319 +#define AL_OUT_OF_MEMORY 0xA005 1.320 + 1.321 + 1.322 +/** Context strings: Vendor Name. */ 1.323 +#define AL_VENDOR 0xB001 1.324 +#define AL_VERSION 0xB002 1.325 +#define AL_RENDERER 0xB003 1.326 +#define AL_EXTENSIONS 0xB004 1.327 + 1.328 +/** Global tweakage. */ 1.329 + 1.330 +/** 1.331 + * Doppler scale. Default 1.0 1.332 + */ 1.333 +#define AL_DOPPLER_FACTOR 0xC000 1.334 + 1.335 +/** 1.336 + * Tweaks speed of propagation. 1.337 + */ 1.338 +#define AL_DOPPLER_VELOCITY 0xC001 1.339 + 1.340 +/** 1.341 + * Speed of Sound in units per second 1.342 + */ 1.343 +#define AL_SPEED_OF_SOUND 0xC003 1.344 + 1.345 +/** 1.346 + * Distance models 1.347 + * 1.348 + * used in conjunction with DistanceModel 1.349 + * 1.350 + * implicit: NONE, which disances distance attenuation. 1.351 + */ 1.352 +#define AL_DISTANCE_MODEL 0xD000 1.353 +#define AL_INVERSE_DISTANCE 0xD001 1.354 +#define AL_INVERSE_DISTANCE_CLAMPED 0xD002 1.355 +#define AL_LINEAR_DISTANCE 0xD003 1.356 +#define AL_LINEAR_DISTANCE_CLAMPED 0xD004 1.357 +#define AL_EXPONENT_DISTANCE 0xD005 1.358 +#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006 1.359 + 1.360 +/* 1.361 + * Renderer State management 1.362 + */ 1.363 +AL_API void AL_APIENTRY alEnable( ALenum capability ); 1.364 + 1.365 +AL_API void AL_APIENTRY alDisable( ALenum capability ); 1.366 + 1.367 +AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability ); 1.368 + 1.369 + 1.370 +/* 1.371 + * State retrieval 1.372 + */ 1.373 +AL_API const ALchar* AL_APIENTRY alGetString( ALenum param ); 1.374 + 1.375 +AL_API void AL_APIENTRY alGetBooleanv( ALenum param, ALboolean* data ); 1.376 + 1.377 +AL_API void AL_APIENTRY alGetIntegerv( ALenum param, ALint* data ); 1.378 + 1.379 +AL_API void AL_APIENTRY alGetFloatv( ALenum param, ALfloat* data ); 1.380 + 1.381 +AL_API void AL_APIENTRY alGetDoublev( ALenum param, ALdouble* data ); 1.382 + 1.383 +AL_API ALboolean AL_APIENTRY alGetBoolean( ALenum param ); 1.384 + 1.385 +AL_API ALint AL_APIENTRY alGetInteger( ALenum param ); 1.386 + 1.387 +AL_API ALfloat AL_APIENTRY alGetFloat( ALenum param ); 1.388 + 1.389 +AL_API ALdouble AL_APIENTRY alGetDouble( ALenum param ); 1.390 + 1.391 + 1.392 +/* 1.393 + * Error support. 1.394 + * Obtain the most recent error generated in the AL state machine. 1.395 + */ 1.396 +AL_API ALenum AL_APIENTRY alGetError( void ); 1.397 + 1.398 + 1.399 +/* 1.400 + * Extension support. 1.401 + * Query for the presence of an extension, and obtain any appropriate 1.402 + * function pointers and enum values. 1.403 + */ 1.404 +AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname ); 1.405 + 1.406 +AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname ); 1.407 + 1.408 +AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename ); 1.409 + 1.410 + 1.411 +/* 1.412 + * LISTENER 1.413 + * Listener represents the location and orientation of the 1.414 + * 'user' in 3D-space. 1.415 + * 1.416 + * Properties include: - 1.417 + * 1.418 + * Gain AL_GAIN ALfloat 1.419 + * Position AL_POSITION ALfloat[3] 1.420 + * Velocity AL_VELOCITY ALfloat[3] 1.421 + * Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors) 1.422 +*/ 1.423 + 1.424 +/* 1.425 + * Set Listener parameters 1.426 + */ 1.427 +AL_API void AL_APIENTRY alListenerf( ALenum param, ALfloat value ); 1.428 + 1.429 +AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); 1.430 + 1.431 +AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values ); 1.432 + 1.433 +AL_API void AL_APIENTRY alListeneri( ALenum param, ALint value ); 1.434 + 1.435 +AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 ); 1.436 + 1.437 +AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values ); 1.438 + 1.439 +/* 1.440 + * Get Listener parameters 1.441 + */ 1.442 +AL_API void AL_APIENTRY alGetListenerf( ALenum param, ALfloat* value ); 1.443 + 1.444 +AL_API void AL_APIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); 1.445 + 1.446 +AL_API void AL_APIENTRY alGetListenerfv( ALenum param, ALfloat* values ); 1.447 + 1.448 +AL_API void AL_APIENTRY alGetListeneri( ALenum param, ALint* value ); 1.449 + 1.450 +AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); 1.451 + 1.452 +AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values ); 1.453 + 1.454 + 1.455 +/** 1.456 + * SOURCE 1.457 + * Sources represent individual sound objects in 3D-space. 1.458 + * Sources take the PCM data provided in the specified Buffer, 1.459 + * apply Source-specific modifications, and then 1.460 + * submit them to be mixed according to spatial arrangement etc. 1.461 + * 1.462 + * Properties include: - 1.463 + * 1.464 + * Gain AL_GAIN ALfloat 1.465 + * Min Gain AL_MIN_GAIN ALfloat 1.466 + * Max Gain AL_MAX_GAIN ALfloat 1.467 + * Position AL_POSITION ALfloat[3] 1.468 + * Velocity AL_VELOCITY ALfloat[3] 1.469 + * Direction AL_DIRECTION ALfloat[3] 1.470 + * Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE) 1.471 + * Reference Distance AL_REFERENCE_DISTANCE ALfloat 1.472 + * Max Distance AL_MAX_DISTANCE ALfloat 1.473 + * RollOff Factor AL_ROLLOFF_FACTOR ALfloat 1.474 + * Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat 1.475 + * Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat 1.476 + * Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat 1.477 + * Pitch AL_PITCH ALfloat 1.478 + * Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE) 1.479 + * MS Offset AL_MSEC_OFFSET ALint or ALfloat 1.480 + * Byte Offset AL_BYTE_OFFSET ALint or ALfloat 1.481 + * Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat 1.482 + * Attached Buffer AL_BUFFER ALint 1.483 + * State (Query only) AL_SOURCE_STATE ALint 1.484 + * Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint 1.485 + * Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint 1.486 + */ 1.487 + 1.488 +/* Create Source objects */ 1.489 +AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources ); 1.490 + 1.491 +/* Delete Source objects */ 1.492 +AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources ); 1.493 + 1.494 +/* Verify a handle is a valid Source */ 1.495 +AL_API ALboolean AL_APIENTRY alIsSource( ALuint sid ); 1.496 + 1.497 +/* 1.498 + * Set Source parameters 1.499 + */ 1.500 +AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value ); 1.501 + 1.502 +AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); 1.503 + 1.504 +AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values ); 1.505 + 1.506 +AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value ); 1.507 + 1.508 +AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); 1.509 + 1.510 +AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values ); 1.511 + 1.512 +/* 1.513 + * Get Source parameters 1.514 + */ 1.515 +AL_API void AL_APIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value ); 1.516 + 1.517 +AL_API void AL_APIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); 1.518 + 1.519 +AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values ); 1.520 + 1.521 +AL_API void AL_APIENTRY alGetSourcei( ALuint sid, ALenum param, ALint* value ); 1.522 + 1.523 +AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); 1.524 + 1.525 +AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values ); 1.526 + 1.527 + 1.528 +/* 1.529 + * Source vector based playback calls 1.530 + */ 1.531 + 1.532 +/* Play, replay, or resume (if paused) a list of Sources */ 1.533 +AL_API void AL_APIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids ); 1.534 + 1.535 +/* Stop a list of Sources */ 1.536 +AL_API void AL_APIENTRY alSourceStopv( ALsizei ns, const ALuint *sids ); 1.537 + 1.538 +/* Rewind a list of Sources */ 1.539 +AL_API void AL_APIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids ); 1.540 + 1.541 +/* Pause a list of Sources */ 1.542 +AL_API void AL_APIENTRY alSourcePausev( ALsizei ns, const ALuint *sids ); 1.543 + 1.544 +/* 1.545 + * Source based playback calls 1.546 + */ 1.547 + 1.548 +/* Play, replay, or resume a Source */ 1.549 +AL_API void AL_APIENTRY alSourcePlay( ALuint sid ); 1.550 + 1.551 +/* Stop a Source */ 1.552 +AL_API void AL_APIENTRY alSourceStop( ALuint sid ); 1.553 + 1.554 +/* Rewind a Source (set playback postiton to beginning) */ 1.555 +AL_API void AL_APIENTRY alSourceRewind( ALuint sid ); 1.556 + 1.557 +/* Pause a Source */ 1.558 +AL_API void AL_APIENTRY alSourcePause( ALuint sid ); 1.559 + 1.560 +/* 1.561 + * Source Queuing 1.562 + */ 1.563 +AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids ); 1.564 + 1.565 +AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids ); 1.566 + 1.567 + 1.568 +/** 1.569 + * BUFFER 1.570 + * Buffer objects are storage space for sample data. 1.571 + * Buffers are referred to by Sources. One Buffer can be used 1.572 + * by multiple Sources. 1.573 + * 1.574 + * Properties include: - 1.575 + * 1.576 + * Frequency (Query only) AL_FREQUENCY ALint 1.577 + * Size (Query only) AL_SIZE ALint 1.578 + * Bits (Query only) AL_BITS ALint 1.579 + * Channels (Query only) AL_CHANNELS ALint 1.580 + */ 1.581 + 1.582 +/* Create Buffer objects */ 1.583 +AL_API void AL_APIENTRY alGenBuffers( ALsizei n, ALuint* buffers ); 1.584 + 1.585 +/* Delete Buffer objects */ 1.586 +AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers ); 1.587 + 1.588 +/* Verify a handle is a valid Buffer */ 1.589 +AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid ); 1.590 + 1.591 +/* Specify the data to be copied into a buffer */ 1.592 +AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); 1.593 + 1.594 +/* 1.595 + * Set Buffer parameters 1.596 + */ 1.597 +AL_API void AL_APIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value ); 1.598 + 1.599 +AL_API void AL_APIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); 1.600 + 1.601 +AL_API void AL_APIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values ); 1.602 + 1.603 +AL_API void AL_APIENTRY alBufferi( ALuint bid, ALenum param, ALint value ); 1.604 + 1.605 +AL_API void AL_APIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); 1.606 + 1.607 +AL_API void AL_APIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values ); 1.608 + 1.609 +/* 1.610 + * Get Buffer parameters 1.611 + */ 1.612 +AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value ); 1.613 + 1.614 +AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); 1.615 + 1.616 +AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values ); 1.617 + 1.618 +AL_API void AL_APIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value ); 1.619 + 1.620 +AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); 1.621 + 1.622 +AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values ); 1.623 + 1.624 + 1.625 +/* 1.626 + * Global Parameters 1.627 + */ 1.628 +AL_API void AL_APIENTRY alDopplerFactor( ALfloat value ); 1.629 + 1.630 +AL_API void AL_APIENTRY alDopplerVelocity( ALfloat value ); 1.631 + 1.632 +AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value ); 1.633 + 1.634 +AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel ); 1.635 + 1.636 +/* 1.637 + * Pointer-to-function types, useful for dynamically getting AL entry points. 1.638 + */ 1.639 +typedef void (AL_APIENTRY *LPALENABLE)( ALenum capability ); 1.640 +typedef void (AL_APIENTRY *LPALDISABLE)( ALenum capability ); 1.641 +typedef ALboolean (AL_APIENTRY *LPALISENABLED)( ALenum capability ); 1.642 +typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)( ALenum param ); 1.643 +typedef void (AL_APIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data ); 1.644 +typedef void (AL_APIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data ); 1.645 +typedef void (AL_APIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data ); 1.646 +typedef void (AL_APIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data ); 1.647 +typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)( ALenum param ); 1.648 +typedef ALint (AL_APIENTRY *LPALGETINTEGER)( ALenum param ); 1.649 +typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)( ALenum param ); 1.650 +typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)( ALenum param ); 1.651 +typedef ALenum (AL_APIENTRY *LPALGETERROR)( void ); 1.652 +typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname ); 1.653 +typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)( const ALchar* fname ); 1.654 +typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)( const ALchar* ename ); 1.655 +typedef void (AL_APIENTRY *LPALLISTENERF)( ALenum param, ALfloat value ); 1.656 +typedef void (AL_APIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); 1.657 +typedef void (AL_APIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values ); 1.658 +typedef void (AL_APIENTRY *LPALLISTENERI)( ALenum param, ALint value ); 1.659 +typedef void (AL_APIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 ); 1.660 +typedef void (AL_APIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values ); 1.661 +typedef void (AL_APIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value ); 1.662 +typedef void (AL_APIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); 1.663 +typedef void (AL_APIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values ); 1.664 +typedef void (AL_APIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value ); 1.665 +typedef void (AL_APIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); 1.666 +typedef void (AL_APIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values ); 1.667 +typedef void (AL_APIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources ); 1.668 +typedef void (AL_APIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources ); 1.669 +typedef ALboolean (AL_APIENTRY *LPALISSOURCE)( ALuint sid ); 1.670 +typedef void (AL_APIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value); 1.671 +typedef void (AL_APIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); 1.672 +typedef void (AL_APIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values ); 1.673 +typedef void (AL_APIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value); 1.674 +typedef void (AL_APIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); 1.675 +typedef void (AL_APIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values ); 1.676 +typedef void (AL_APIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value ); 1.677 +typedef void (AL_APIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); 1.678 +typedef void (AL_APIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values ); 1.679 +typedef void (AL_APIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value ); 1.680 +typedef void (AL_APIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); 1.681 +typedef void (AL_APIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values ); 1.682 +typedef void (AL_APIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids ); 1.683 +typedef void (AL_APIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids ); 1.684 +typedef void (AL_APIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids ); 1.685 +typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids ); 1.686 +typedef void (AL_APIENTRY *LPALSOURCEPLAY)( ALuint sid ); 1.687 +typedef void (AL_APIENTRY *LPALSOURCESTOP)( ALuint sid ); 1.688 +typedef void (AL_APIENTRY *LPALSOURCEREWIND)( ALuint sid ); 1.689 +typedef void (AL_APIENTRY *LPALSOURCEPAUSE)( ALuint sid ); 1.690 +typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids ); 1.691 +typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids ); 1.692 +typedef void (AL_APIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers ); 1.693 +typedef void (AL_APIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers ); 1.694 +typedef ALboolean (AL_APIENTRY *LPALISBUFFER)( ALuint bid ); 1.695 +typedef void (AL_APIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); 1.696 +typedef void (AL_APIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value); 1.697 +typedef void (AL_APIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); 1.698 +typedef void (AL_APIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values ); 1.699 +typedef void (AL_APIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value); 1.700 +typedef void (AL_APIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); 1.701 +typedef void (AL_APIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values ); 1.702 +typedef void (AL_APIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value ); 1.703 +typedef void (AL_APIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); 1.704 +typedef void (AL_APIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values ); 1.705 +typedef void (AL_APIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value ); 1.706 +typedef void (AL_APIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); 1.707 +typedef void (AL_APIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values ); 1.708 +typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)( ALfloat value ); 1.709 +typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value ); 1.710 +typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value ); 1.711 +typedef void (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel ); 1.712 + 1.713 +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC 1.714 + #pragma export off 1.715 +#endif 1.716 + 1.717 +#if defined(__cplusplus) 1.718 +} /* extern "C" */ 1.719 +#endif 1.720 + 1.721 +#endif /* AL_AL_H */