5 * OpenAL cross platform audio library
6 * Copyright (C) 1999-2000 by authors.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 * Or go to http://www.gnu.org/copyleft/lgpl.html
30 #define ALAPI __declspec(dllexport)
31 #define ALAPIENTRY __cdecl
38 #endif /* TARGET_OS_MAC */
39 #endif /* TARGET_OS_MAC */
55 #ifndef AL_NO_PROTOTYPES
58 * OpenAL Maintenance Functions
59 * State Management and Query.
65 /** Renderer State management. */
66 ALAPI void ALAPIENTRY alEnable( ALenum capability );
68 ALAPI void ALAPIENTRY alDisable( ALenum capability );
70 ALAPI ALboolean ALAPIENTRY alIsEnabled( ALenum capability );
72 /** Application preferences for driver performance choices. */
73 ALAPI void ALAPIENTRY alHint( ALenum target, ALenum mode );
75 /** State retrieval. */
76 ALAPI void ALAPIENTRY alGetBooleanv( ALenum param, ALboolean* data );
78 /** State retrieval. */
79 ALAPI void ALAPIENTRY alGetIntegerv( ALenum param, ALint* data );
81 /** State retrieval. */
82 ALAPI void ALAPIENTRY alGetFloatv( ALenum param, ALfloat* data );
84 /** State retrieval. */
85 ALAPI void ALAPIENTRY alGetDoublev( ALenum param, ALdouble* data );
87 /** State retrieval. */
88 ALAPI const ALubyte* ALAPIENTRY alGetString( ALenum param );
91 /** State retrieval.through return value ( for compatibility ) */
92 ALAPI ALboolean ALAPIENTRY alGetBoolean( ALenum param );
93 ALAPI ALint ALAPIENTRY alGetInteger( ALenum param );
94 ALAPI ALfloat ALAPIENTRY alGetFloat( ALenum param );
95 ALAPI ALdouble ALAPIENTRY alGetDouble( ALenum param );
99 * Obtain the most recent error generated in the AL state machine.
101 ALAPI ALenum ALAPIENTRY alGetError( ALvoid );
105 * Obtain the address of a function (usually an extension)
106 * with the name fname. All addresses are context-independent.
108 ALAPI ALboolean ALAPIENTRY alIsExtensionPresent( const ALubyte* fname );
113 * Obtain the address of a function (usually an extension)
114 * with the name fname. All addresses are context-independent.
116 ALAPI void* ALAPIENTRY alGetProcAddress( const ALubyte* fname );
121 * Obtain the integer value of an enumeration (usually an extension) with the name ename.
123 ALAPI ALenum ALAPIENTRY alGetEnumValue( const ALubyte* ename );
132 * Listener is the sample position for a given context.
133 * The multi-channel (usually stereo) output stream generated
134 * by the mixer is parametrized by this Listener object:
135 * its position and velocity relative to Sources, within
136 * occluder and reflector geometry.
143 * Listener Gain: default 1.0f.
145 ALAPI void ALAPIENTRY alListenerf( ALenum pname, ALfloat param );
147 ALAPI void ALAPIENTRY alListeneri( ALenum pname, ALint param );
151 * Listener Position: ALfloat[3]
152 * Listener Velocity: ALfloat[3]
154 ALAPI void ALAPIENTRY alListener3f( ALenum pname,
155 ALfloat f1, ALfloat f2, ALfloat f3 );
159 * Listener Position: ALfloat[3]
160 * Listener Velocity: ALfloat[3]
161 * Listener Orientation: ALfloat[6] (forward and up vector).
163 ALAPI void ALAPIENTRY alListenerfv( ALenum pname, ALfloat* param );
166 * Retrieve listener information.
168 ALAPI void ALAPIENTRY alGetListeneri( ALenum pname, ALint* value );
169 ALAPI void ALAPIENTRY alGetListenerf( ALenum pname, ALfloat* value );
171 ALAPI void ALAPIENTRY alGetListeneriv( ALenum pname, ALint* value );
172 ALAPI void ALAPIENTRY alGetListenerfv( ALenum pname, ALfloat* values );
174 ALAPI void ALAPIENTRY alGetListener3f( ALenum pname,
175 ALfloat *f1, ALfloat *f2, ALfloat *f3 );
179 * Source objects are by default localized. Sources
180 * take the PCM data provided in the specified Buffer,
181 * apply Source-specific modifications, and then
182 * submit them to be mixed according to spatial
188 /** Create Source objects. */
189 ALAPI void ALAPIENTRY alGenSources( ALsizei n, ALuint* sources );
191 /** Delete Source objects. */
192 ALAPI void ALAPIENTRY alDeleteSources( ALsizei n, ALuint* sources );
194 /** Verify a handle is a valid Source. */
195 ALAPI ALboolean ALAPIENTRY alIsSource( ALuint sid );
198 /** Set an integer parameter for a Source object. */
199 ALAPI void ALAPIENTRY alSourcei( ALuint sid, ALenum param, ALint value );
200 ALAPI void ALAPIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value );
201 ALAPI void ALAPIENTRY alSource3f( ALuint sid, ALenum param,
202 ALfloat f1, ALfloat f2, ALfloat f3 );
203 ALAPI void ALAPIENTRY alSourcefv( ALuint sid, ALenum param, ALfloat* values );
205 /** Get an integer parameter for a Source object. */
206 ALAPI void ALAPIENTRY alGetSourcei( ALuint sid, ALenum pname, ALint* value );
207 ALAPI void ALAPIENTRY alGetSourceiv( ALuint sid, ALenum pname, ALint* values );
208 ALAPI void ALAPIENTRY alGetSourcef( ALuint sid, ALenum pname, ALfloat* value );
209 ALAPI void ALAPIENTRY alGetSourcefv( ALuint sid, ALenum pname, ALfloat* values );
211 /* deprecated, included for Win compatibility */
212 ALAPI void ALAPIENTRY alGetSource3f( ALuint sid, ALenum pname, ALfloat* value1,
213 ALfloat* value2, ALfloat* value3);
215 ALAPI void ALAPIENTRY alSourcePlayv( ALsizei ns, ALuint *ids );
216 ALAPI void ALAPIENTRY alSourceStopv( ALsizei ns, ALuint *ids );
217 ALAPI void ALAPIENTRY alSourceRewindv( ALsizei ns, ALuint *ids );
218 ALAPI void ALAPIENTRY alSourcePausev( ALsizei ns, ALuint *ids );
220 /** Activate a source, start replay. */
221 ALAPI void ALAPIENTRY alSourcePlay( ALuint sid );
225 * temporarily remove it from the mixer list.
227 ALAPI void ALAPIENTRY alSourcePause( ALuint sid );
231 * set the source to play at the beginning.
233 ALAPI void ALAPIENTRY alSourceRewind( ALuint sid );
237 * temporarily remove it from the mixer list,
238 * and reset its internal state to pre-Play.
239 * To remove a Source completely, it has to be
240 * deleted following Stop, or before Play.
242 ALAPI void ALAPIENTRY alSourceStop( ALuint sid );
246 * Buffer objects are storage space for sample data.
247 * Buffers are referred to by Sources. There can be more than
248 * one Source using the same Buffer data. If Buffers have
249 * to be duplicated on a per-Source basis, the driver has to
250 * take care of allocation, copying, and deallocation as well
251 * as propagating buffer data changes.
257 /** Buffer object generation. */
258 ALAPI void ALAPIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
260 ALAPI void ALAPIENTRY alDeleteBuffers( ALsizei n, ALuint* buffers );
263 ALAPI ALboolean ALAPIENTRY alIsBuffer( ALuint buffer );
266 * Specify the data to be filled into a buffer.
268 ALAPI void ALAPIENTRY alBufferData( ALuint buffer,
274 ALAPI void ALAPIENTRY alGetBufferi( ALuint buffer, ALenum param, ALint* value );
275 ALAPI void ALAPIENTRY alGetBufferf( ALuint buffer, ALenum param, ALfloat* value );
276 ALAPI void ALAPIENTRY alGetBufferiv( ALuint buffer, ALenum param, ALint *v);
277 ALAPI void ALAPIENTRY alGetBufferfv( ALuint buffer, ALenum param, ALfloat *v);
282 * Frequency Domain Filters are band filters.
283 * Attenuation in Media (distance based)
284 * Reflection Material
285 * Occlusion Material (separating surface)
287 * Temporal Domain Filters:
297 * EXTENSION: IASIG Level 2 Environment.
298 * Environment object generation.
299 * This is an EXTension that describes the Environment/Reverb
300 * properties according to IASIG Level 2 specifications.
308 * Allocate n environment ids and store them in the array environs.
309 * Returns the number of environments actually allocated.
311 ALAPI ALsizei ALAPIENTRY alGenEnvironmentIASIG( ALsizei n, ALuint* environs );
313 ALAPI void ALAPIENTRY alDeleteEnvironmentIASIG( ALsizei n, ALuint* environs );
315 ALAPI ALboolean ALAPIENTRY alIsEnvironmentIASIG( ALuint environ );
317 ALAPI void ALAPIENTRY alEnvironmentiIASIG( ALuint eid, ALenum param, ALint value );
319 ALAPI void ALAPIENTRY alEnvironmentfIASIG( ALuint eid, ALenum param, ALfloat value );
326 ALAPI void ALAPIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
327 ALAPI void ALAPIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
328 ALAPI void ALAPIENTRY alQueuei( ALuint sid, ALenum param, ALint value );
333 ALAPI void ALAPIENTRY alDopplerFactor( ALfloat value );
334 ALAPI void ALAPIENTRY alDopplerVelocity( ALfloat value );
335 ALAPI void ALAPIENTRY alDistanceModel( ALenum distanceModel );
337 #else /* AL_NO_PROTOTYPES */
340 /** OpenAL Maintenance Functions */
342 void (*alEnable)( ALenum capability );
343 void (*alDisable)( ALenum capability );
344 ALboolean (*alIsEnabled)( ALenum capability );
345 void (*alHint)( ALenum target, ALenum mode );
346 ALboolean (*alGetBoolean)( ALenum param );
347 ALint (*alGetInteger)( ALenum param );
348 ALfloat (*alGetFloat)( ALenum param );
349 ALdouble (*alGetDouble)( ALenum param );
350 void (*alGetBooleanv)( ALenum param,
352 void (*alGetIntegerv)( ALenum param,
354 void (*alGetFloatv)( ALenum param,
356 void (*alGetDoublev)( ALenum param,
358 const ALubyte* (*GetString)( ALenum param );
359 ALenum (*alGetError)( ALvoid );
363 * Query existance of extension
365 ALboolean (*alIsExtensionPresent)(const ALubyte* fname );
369 * Obtain the address of a function (usually an extension)
370 * with the name fname. All addresses are context-independent.
372 void* (*alGetProcAddress)( const ALubyte* fname );
377 * Obtain the integer value of an enumeration (usually an extension) with the name ename.
379 ALenum (*alGetEnumValue)( const ALubyte* ename );
383 * Listener is the sample position for a given context.
384 * The multi-channel (usually stereo) output stream generated
385 * by the mixer is parametrized by this Listener object:
386 * its position and velocity relative to Sources, within
387 * occluder and reflector geometry.
391 * Listener Gain: default 1.0f.
393 void (*alListenerf)( ALenum pname, ALfloat param );
397 * Listener Position: ALfloat[3]
398 * Listener Velocity: ALfloat[3]
399 * Listener Orientation: ALfloat[6] (forward and up vector).
401 void (*alListenerfv)( ALenum pname, ALfloat* param );
404 * Retrieve listener information.
406 void (*alGetListeneri)( ALenum pname, ALint* value );
407 void (*alGetListenerf)( ALenum pname, ALfloat* value );
409 void (*alGetListeneriv)( ALenum pname, ALint* values );
410 void (*alGetListenerfv)( ALenum pname, ALfloat* values );
414 * Source objects are by default localized. Sources
415 * take the PCM data provided in the specified Buffer,
416 * apply Source-specific modifications, and then
417 * submit them to be mixed according to spatial
421 /** Create Source objects. */
422 void (*alGenSources)( ALsizei n, ALuint* sources );
424 /** Delete Source objects. */
425 void (*alDeleteSources)( ALsizei n, ALuint* sources );
427 /** Verify a handle is a valid Source. */
428 ALboolean (*alIsSource)( ALuint sid );
430 /** Set an integer parameter for a Source object. */
431 void (*alSourcei)( ALuint sid, ALenum param, ALint value);
433 /** Set a float parameter for a Source object. */
434 void (*alSourcef)( ALuint sid, ALenum param, ALfloat value);
436 /** Set a 3 float parameter for a Source object. */
437 void (*alSource3f)( ALuint sid, ALenum param,
438 ALfloat f1, ALfloat f2, ALfloat f3 );
440 /** Set a float vector parameter for a Source object. */
441 void (*alSourcefv)( ALuint sid, ALenum param,
444 /** Get an integer scalar parameter for a Source object. */
445 void (*alGetSourcei)( ALuint sid,
446 ALenum pname, ALint* value );
448 /** Get an integer parameter for a Source object. */
449 void (*alGetSourceiv)( ALuint sid,
450 ALenum pname, ALint* values );
452 /** Get a float scalar parameter for a Source object. */
453 void (*alGetSourcef)( ALuint sid,
454 ALenum pname, ALfloat* value );
456 /** Get three float scalar parameter for a Source object. */
457 void (*alGetSource3f)( ALuint sid, ALenum pname,
462 /** Get a float vector parameter for a Source object. */
463 void (*alGetSourcefv)( ALuint sid,
464 ALenum pname, ALfloat* values );
467 /** Activate a source, start replay. */
468 void (*alSourcePlay)( ALuint sid );
472 * temporarily remove it from the mixer list.
474 void (*alSourcePause)( ALuint sid );
478 * temporarily remove it from the mixer list,
479 * and reset its internal state to pre-Play.
480 * To remove a Source completely, it has to be
481 * deleted following Stop, or before Play.
483 void (*alSourceStop)( ALuint sid );
486 * Rewind a souce. Stopped paused and playing sources,
487 * resets the offset into the PCM data and sets state to
490 void (*alSourceRewind)( ALuint sid );
493 * vector forms of those functions we all love
495 void (*alSourcePlayv)( ALsizei ns, ALuint *ids );
496 void (*alSourceStopv)( ALsizei ns, ALuint *ids );
497 void (*alSourceRewindv)( ALsizei ns, ALuint *ids );
498 void (*alSourcePausev)( ALsizei ns, ALuint *ids );
502 * Buffer objects are storage space for sample data.
503 * Buffers are referred to by Sources. There can be more than
504 * one Source using the same Buffer data. If Buffers have
505 * to be duplicated on a per-Source basis, the driver has to
506 * take care of allocation, copying, and deallocation as well
507 * as propagating buffer data changes.
510 /** Buffer object generation. */
511 void (*alGenBuffers)( ALsizei n, ALuint* buffers );
512 void (*alDeleteBuffers)( ALsizei n, ALuint* buffers );
513 ALboolean (*alIsBuffer)( ALuint buffer );
516 * Specify the data to be filled into a buffer.
518 void (*alBufferData)( ALuint buffer,
524 void (*alGetBufferi)( ALuint buffer,
525 ALenum param, ALint* value );
526 void (*alGetBufferf)( ALuint buffer,
527 ALenum param, ALfloat* value );
528 void (*alGetBufferiv)( ALuint buffer,
529 ALenum param, ALint* value );
530 void (*alGetBufferfv)( ALuint buffer,
531 ALenum param, ALfloat* value );
534 * EXTENSION: IASIG Level 2 Environment.
535 * Environment object generation.
536 * This is an EXTension that describes the Environment/Reverb
537 * properties according to IASIG Level 2 specifications.
540 * Allocate n environment ids and store them in the array environs.
541 * Returns the number of environments actually allocated.
543 ALsizei (*alGenEnvironmentIASIG)( ALsizei n, ALuint* environs );
544 void (*alDeleteEnvironmentIASIG)(ALsizei n,
546 ALboolean (*alIsEnvironmentIASIG)( ALuint environ );
547 void (*alEnvironmentiIASIG)( ALuint eid,
548 ALenum param, ALint value );
549 void (*alEnvironmentfIASIG)( ALuint eid,
550 ALenum param, ALuint value );
554 void (*alQueuei)(ALuint sid, ALenum param, ALint value );
555 void (*alSourceUnqueueBuffers)(ALuint sid, ALsizei numEntries, ALuint *bids );
556 void (*alSourceQueueBuffers)(ALuint sid, ALsizei numEntries, ALuint *bids );
558 void (*alDopplerFactor)( ALfloat value );
559 void (*alDopplerVelocity)( ALfloat value );
560 void (*alDistanceModel)( ALenum distanceModel );
563 * Frequency Domain Filters are band filters.
564 * Attenuation in Media (distance based)
565 * Reflection Material
566 * Occlusion Material (separating surface)
568 * Temporal Domain Filters:
574 #endif /* AL_NO_PROTOTYPES */
579 #endif /* TARGET_OS_MAC */
580 #endif /* TARGET_OS_MAC */