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
32 #define ALAPI __declspec(dllexport)
34 #define ALAPI __declspec(dllimport)
36 #define ALAPIENTRY __cdecl
51 #ifndef AL_NO_PROTOTYPES
54 * OpenAL Maintenance Functions
55 * Initialization and exiting.
56 * State Management and Query.
61 /** State management. */
62 ALAPI ALvoid ALAPIENTRY alEnable( ALenum capability );
63 ALAPI ALvoid ALAPIENTRY alDisable( ALenum capability );
64 ALAPI ALboolean ALAPIENTRY alIsEnabled( ALenum capability );
66 /** Application preferences for driver performance choices. */
67 ALAPI ALvoid ALAPIENTRY alHint( ALenum target, ALenum mode );
69 /** State retrieval. */
70 ALAPI ALboolean ALAPIENTRY alGetBoolean( ALenum param );
71 ALAPI ALint ALAPIENTRY alGetInteger( ALenum param );
72 ALAPI ALfloat ALAPIENTRY alGetFloat( ALenum param );
73 ALAPI ALdouble ALAPIENTRY alGetDouble( ALenum param );
74 ALAPI ALvoid ALAPIENTRY alGetBooleanv( ALenum param, ALboolean* data );
75 ALAPI ALvoid ALAPIENTRY alGetIntegerv( ALenum param, ALint* data );
76 ALAPI ALvoid ALAPIENTRY alGetFloatv( ALenum param, ALfloat* data );
77 ALAPI ALvoid ALAPIENTRY alGetDoublev( ALenum param, ALdouble* data );
78 ALAPI ALubyte* ALAPIENTRY alGetString( ALenum param );
80 ALAPI ALvoid ALAPIENTRY alSetInteger( ALenum pname, ALint value );
81 ALAPI ALvoid ALAPIENTRY alSetDouble( ALenum pname, ALdouble value );
85 * Obtain the most recent error generated in the AL state machine.
87 ALAPI ALenum ALAPIENTRY alGetError();
92 * Obtain the address of a function (usually an extension)
93 * with the name fname. All addresses are context-independent.
95 ALAPI ALboolean ALAPIENTRY alIsExtensionPresent( ALubyte* fname );
100 * Obtain the address of a function (usually an extension)
101 * with the name fname. All addresses are context-independent.
103 ALAPI ALvoid* ALAPIENTRY alGetProcAddress( ALubyte* fname );
108 * Obtain the integer value of an enumeration (usually an extension) with the name ename.
110 ALAPI ALenum ALAPIENTRY alGetEnumValue( ALubyte* ename );
117 * Listener is the sample position for a given context.
118 * The multi-channel (usually stereo) output stream generated
119 * by the mixer is parametrized by this Listener object:
120 * its position and velocity relative to Sources, within
121 * occluder and reflector geometry.
128 * Listener Environment: default 0.
130 ALAPI ALvoid ALAPIENTRY alListeneri( ALenum param, ALint value );
135 * Listener Gain: default 1.0f.
137 ALAPI ALvoid ALAPIENTRY alListenerf( ALenum param, ALfloat value );
145 ALAPI ALvoid ALAPIENTRY alListener3f( ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 );
150 * Listener Position: ALfloat[3]
151 * Listener Velocity: ALfloat[3]
152 * Listener Orientation: ALfloat[6] (forward and up vector).
154 ALAPI ALvoid ALAPIENTRY alListenerfv( ALenum param, ALfloat* values );
156 ALAPI ALvoid ALAPIENTRY alGetListeneri( ALenum param, ALint* value );
157 ALAPI ALvoid ALAPIENTRY alGetListenerf( ALenum param, ALfloat* value );
158 ALAPI ALvoid ALAPIENTRY alGetListener3f( ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 );
159 ALAPI ALvoid ALAPIENTRY alGetListenerfv( ALenum param, ALfloat* values );
164 * Source objects are by default localized. Sources
165 * take the PCM data provided in the specified Buffer,
166 * apply Source-specific modifications, and then
167 * submit them to be mixed according to spatial
173 /** Create Source objects. */
174 ALAPI ALvoid ALAPIENTRY alGenSources( ALsizei n, ALuint* sources );
176 /** Delete Source objects. */
177 ALAPI ALvoid ALAPIENTRY alDeleteSources( ALsizei n, ALuint* sources );
179 /** Verify a handle is a valid Source. */
180 ALAPI ALboolean ALAPIENTRY alIsSource( ALuint id );
182 /** Set an integer parameter for a Source object. */
183 ALAPI ALvoid ALAPIENTRY alSourcei( ALuint source, ALenum param, ALint value );
184 ALAPI ALvoid ALAPIENTRY alSourcef( ALuint source, ALenum param, ALfloat value );
185 ALAPI ALvoid ALAPIENTRY alSource3f( ALuint source, ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 );
186 ALAPI ALvoid ALAPIENTRY alSourcefv( ALuint source, ALenum param, ALfloat* values );
188 /** Get an integer parameter for a Source object. */
189 ALAPI ALvoid ALAPIENTRY alGetSourcei( ALuint source, ALenum param, ALint* value );
190 ALAPI ALvoid ALAPIENTRY alGetSourcef( ALuint source, ALenum param, ALfloat* value );
191 ALAPI ALvoid ALAPIENTRY alGetSource3f( ALuint source, ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 );
192 ALAPI ALvoid ALAPIENTRY alGetSourcefv( ALuint source, ALenum param, ALfloat* values );
194 ALAPI ALvoid ALAPIENTRY alSourcePlayv( ALsizei n, ALuint *sources );
195 ALAPI ALvoid ALAPIENTRY alSourcePausev( ALsizei n, ALuint *sources );
196 ALAPI ALvoid ALAPIENTRY alSourceStopv( ALsizei n, ALuint *sources );
197 ALAPI ALvoid ALAPIENTRY alSourceRewindv(ALsizei n,ALuint *sources);
199 /** Activate a source, start replay. */
200 ALAPI ALvoid ALAPIENTRY alSourcePlay( ALuint source );
204 * temporarily remove it from the mixer list.
206 ALAPI ALvoid ALAPIENTRY alSourcePause( ALuint source );
210 * temporarily remove it from the mixer list,
211 * and reset its internal state to pre-Play.
212 * To remove a Source completely, it has to be
213 * deleted following Stop, or before Play.
215 ALAPI ALvoid ALAPIENTRY alSourceStop( ALuint source );
219 * temporarily remove it from the mixer list,
220 * and reset its internal state to pre-Play.
222 ALAPI ALvoid ALAPIENTRY alSourceRewind( ALuint source );
228 * Buffer objects are storage space for sample data.
229 * Buffers are referred to by Sources. There can be more than
230 * one Source using the same Buffer data. If Buffers have
231 * to be duplicated on a per-Source basis, the driver has to
232 * take care of allocation, copying, and deallocation as well
233 * as propagating buffer data changes.
239 /** Buffer object generation. */
240 ALAPI ALvoid ALAPIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
241 ALAPI ALvoid ALAPIENTRY alDeleteBuffers( ALsizei n, ALuint* buffers );
242 ALAPI ALboolean ALAPIENTRY alIsBuffer( ALuint buffer );
245 * Specify the data to be filled into a buffer.
247 ALAPI ALvoid ALAPIENTRY alBufferData( ALuint buffer,
254 ALAPI ALvoid ALAPIENTRY alGetBufferi( ALuint buffer, ALenum param, ALint* value );
255 ALAPI ALvoid ALAPIENTRY alGetBufferf( ALuint buffer, ALenum param, ALfloat* value );
264 ALAPI ALvoid ALAPIENTRY alSourceQueueBuffers( ALuint source, ALsizei n, ALuint* buffers );
265 ALAPI ALvoid ALAPIENTRY alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint* buffers );
270 ALAPI ALvoid ALAPIENTRY alDistanceModel( ALenum value );
271 ALAPI ALvoid ALAPIENTRY alDopplerFactor( ALfloat value );
272 ALAPI ALvoid ALAPIENTRY alDopplerVelocity( ALfloat value );
274 #else /* AL_NO_PROTOTYPES */
277 * OpenAL Maintenance Functions
278 * Initialization and exiting.
279 * State Management and Query.
284 /** State management. */
285 ALAPI ALvoid ALAPIENTRY (*alEnable)( ALenum capability );
286 ALAPI ALvoid ALAPIENTRY (*alDisable)( ALenum capability );
287 ALAPI ALboolean ALAPIENTRY (*alIsEnabled)( ALenum capability );
289 /** Application preferences for driver performance choices. */
290 ALAPI ALvoid ALAPIENTRY (*alHint)( ALenum target, ALenum mode );
292 /** State retrieval. */
293 ALAPI ALboolean ALAPIENTRY (*alGetBoolean)( ALenum param );
294 ALAPI ALint ALAPIENTRY (*alGetInteger)( ALenum param );
295 ALAPI ALfloat ALAPIENTRY (*alGetFloat)( ALenum param );
296 ALAPI ALdouble ALAPIENTRY (*alGetDouble)( ALenum param );
297 ALAPI ALvoid ALAPIENTRY (*alGetBooleanv)( ALenum param, ALboolean* data );
298 ALAPI ALvoid ALAPIENTRY (*alGetIntegerv)( ALenum param, ALint* data );
299 ALAPI ALvoid ALAPIENTRY (*alGetFloatv)( ALenum param, ALfloat* data );
300 ALAPI ALvoid ALAPIENTRY (*alGetDoublev)( ALenum param, ALdouble* data );
301 ALAPI ALubyte* ALAPIENTRY (*alGetString)( ALenum param );
303 ALAPI ALvoid ALAPIENTRY (*alSetInteger)( ALenum pname, ALint value );
304 ALAPI ALvoid ALAPIENTRY (*alSetDouble)( ALenum pname, ALdouble value );
308 * Obtain the most recent error generated in the AL state machine.
310 ALAPI ALenum ALAPIENTRY (*alGetError)( ALvoid );
315 * Obtain the address of a function (usually an extension)
316 * with the name fname. All addresses are context-independent.
318 ALAPI ALboolean ALAPIENTRY (*alIsExtensionPresent)( ALubyte* fname );
323 * Obtain the address of a function (usually an extension)
324 * with the name fname. All addresses are context-independent.
326 ALAPI ALvoid* ALAPIENTRY (*alGetProcAddress)( ALubyte* fname );
331 * Obtain the integer value of an enumeration (usually an extension) with the name ename.
333 ALAPI ALenum ALAPIENTRY (*alGetEnumValue)( ALubyte* ename );
340 * Listener is the sample position for a given context.
341 * The multi-channel (usually stereo) output stream generated
342 * by the mixer is parametrized by this Listener object:
343 * its position and velocity relative to Sources, within
344 * occluder and reflector geometry.
351 * Listener Environment: default 0.
353 ALAPI ALvoid ALAPIENTRY (*alListeneri)( ALenum param, ALint value );
358 * Listener Gain: default 1.0f.
360 ALAPI ALvoid ALAPIENTRY (*alListenerf)( ALenum param, ALfloat value );
368 ALAPI ALvoid ALAPIENTRY (*alListener3f)( ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 );
373 * Listener Position: ALfloat[3]
374 * Listener Velocity: ALfloat[3]
375 * Listener Orientation: ALfloat[6] (forward and up vector).
377 ALAPI ALvoid ALAPIENTRY (*alListenerfv)( ALenum param, ALfloat* values );
379 ALAPI ALvoid ALAPIENTRY (*alGetListeneri)( ALenum param, ALint* value );
380 ALAPI ALvoid ALAPIENTRY (*alGetListenerf)( ALenum param, ALfloat* value );
381 ALAPI ALvoid ALAPIENTRY (*alGetListener3f)( ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 );
382 ALAPI ALvoid ALAPIENTRY (*alGetListenerfv)( ALenum param, ALfloat* values );
387 * Source objects are by default localized. Sources
388 * take the PCM data provided in the specified Buffer,
389 * apply Source-specific modifications, and then
390 * submit them to be mixed according to spatial
396 /** Create Source objects. */
397 ALAPI ALvoid ALAPIENTRY (*alGenSources)( ALsizei n, ALuint* sources );
399 /** Delete Source objects. */
400 ALAPI ALvoid ALAPIENTRY (*alDeleteSources)( ALsizei n, ALuint* sources );
402 /** Verify a handle is a valid Source. */
403 ALAPI ALboolean ALAPIENTRY (*alIsSource)( ALuint id );
405 /** Set an integer parameter for a Source object. */
406 ALAPI ALvoid ALAPIENTRY (*alSourcei)( ALuint source, ALenum param, ALint value );
407 ALAPI ALvoid ALAPIENTRY (*alSourcef)( ALuint source, ALenum param, ALfloat value );
408 ALAPI ALvoid ALAPIENTRY (*alSource3f)( ALuint source, ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 );
409 ALAPI ALvoid ALAPIENTRY (*alSourcefv)( ALuint source, ALenum param, ALfloat* values );
411 /** Get an integer parameter for a Source object. */
412 ALAPI ALvoid ALAPIENTRY (*alGetSourcei)( ALuint source, ALenum param, ALint* value );
413 ALAPI ALvoid ALAPIENTRY (*alGetSourcef)( ALuint source, ALenum param, ALfloat* value );
414 ALAPI ALvoid ALAPIENTRY (*alGetSourcefv)( ALuint source, ALenum param, ALfloat* values );
416 ALAPI ALvoid ALAPIENTRY (*alSourcePlayv)( ALsizei n, ALuint *sources );
417 ALAPI ALvoid ALAPIENTRY (*alSourceStopv)( ALsizei n, ALuint *sources );
419 /** Activate a source, start replay. */
420 ALAPI ALvoid ALAPIENTRY (*alSourcePlay)( ALuint source );
424 * temporarily remove it from the mixer list.
426 ALAPI ALvoid ALAPIENTRY (*alSourcePause)( ALuint source );
430 * temporarily remove it from the mixer list,
431 * and reset its internal state to pre-Play.
432 * To remove a Source completely, it has to be
433 * deleted following Stop, or before Play.
435 ALAPI ALvoid ALAPIENTRY (*alSourceStop)( ALuint source );
441 * Buffer objects are storage space for sample data.
442 * Buffers are referred to by Sources. There can be more than
443 * one Source using the same Buffer data. If Buffers have
444 * to be duplicated on a per-Source basis, the driver has to
445 * take care of allocation, copying, and deallocation as well
446 * as propagating buffer data changes.
452 /** Buffer object generation. */
453 ALAPI ALvoid ALAPIENTRY (*alGenBuffers)( ALsizei n, ALuint* buffers );
454 ALAPI ALvoid ALAPIENTRY (*alDeleteBuffers)( ALsizei n, ALuint* buffers );
455 ALAPI ALboolean ALAPIENTRY (*alIsBuffer)( ALuint buffer );
458 * Specify the data to be filled into a buffer.
460 ALAPI ALvoid ALAPIENTRY (*alBufferData)( ALuint buffer,
466 ALAPI ALvoid ALAPIENTRY (*alGetBufferi)( ALuint buffer, ALenum param, ALint* value );
467 ALAPI ALvoid ALAPIENTRY (*alGetBufferf)( ALuint buffer, ALenum param, ALfloat* value );
475 ALAPI ALvoid ALAPIENTRY (*alSourceQueueBuffers)( ALuint source, ALsizei n, ALuint* buffers );
476 ALAPI ALvoid ALAPIENTRY (*alSourceUnqueueBuffers)( ALuint source, ALsizei n, ALuint* buffers );
481 ALAPI ALvoid ALAPIENTRY (*alDistanceModel)( ALenum value );
482 ALAPI ALvoid ALAPIENTRY (*alDopplerFactor)( ALfloat value );
483 ALAPI ALvoid ALAPIENTRY (*alDopplerVelocity)( ALfloat value );
486 #endif /* AL_NO_PROTOTYPES */