1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
|
#ifndef __al_h_
#define __al_h_
/**
* OpenAL cross platform audio library
* Copyright (C) 1999-2000 by authors.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* Or go to http://www.gnu.org/copyleft/lgpl.html
*/
#include "altypes.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#define ALAPI __declspec(dllexport)
#define ALAPIENTRY __cdecl
#define AL_CALLBACK
#else /* _WIN32 */
#ifdef TARGET_OS_MAC
#if TARGET_OS_MAC
#pragma export on
#endif /* TARGET_OS_MAC */
#endif /* TARGET_OS_MAC */
#ifndef ALAPI
#define ALAPI
#endif
#ifndef ALAPIENTRY
#define ALAPIENTRY
#endif
#ifndef CALLBACK
#define AL_CALLBACK
#endif
#endif /* _WIN32 */
#ifndef AL_NO_PROTOTYPES
/**
* OpenAL Maintenance Functions
* State Management and Query.
* Error Handling.
* Extension Support.
*/
/** Renderer State management. */
ALAPI void ALAPIENTRY alEnable( ALenum capability );
ALAPI void ALAPIENTRY alDisable( ALenum capability );
ALAPI ALboolean ALAPIENTRY alIsEnabled( ALenum capability );
/** Application preferences for driver performance choices. */
ALAPI void ALAPIENTRY alHint( ALenum target, ALenum mode );
/** State retrieval. */
ALAPI void ALAPIENTRY alGetBooleanv( ALenum param, ALboolean* data );
/** State retrieval. */
ALAPI void ALAPIENTRY alGetIntegerv( ALenum param, ALint* data );
/** State retrieval. */
ALAPI void ALAPIENTRY alGetFloatv( ALenum param, ALfloat* data );
/** State retrieval. */
ALAPI void ALAPIENTRY alGetDoublev( ALenum param, ALdouble* data );
/** State retrieval. */
ALAPI const ALubyte* ALAPIENTRY alGetString( ALenum param );
/** State retrieval.through return value ( for compatibility ) */
ALAPI ALboolean ALAPIENTRY alGetBoolean( ALenum param );
ALAPI ALint ALAPIENTRY alGetInteger( ALenum param );
ALAPI ALfloat ALAPIENTRY alGetFloat( ALenum param );
ALAPI ALdouble ALAPIENTRY alGetDouble( ALenum param );
/**
* Error support.
* Obtain the most recent error generated in the AL state machine.
*/
ALAPI ALenum ALAPIENTRY alGetError( ALvoid );
/**
* Extension support.
* Obtain the address of a function (usually an extension)
* with the name fname. All addresses are context-independent.
*/
ALAPI ALboolean ALAPIENTRY alIsExtensionPresent( const ALubyte* fname );
/**
* Extension support.
* Obtain the address of a function (usually an extension)
* with the name fname. All addresses are context-independent.
*/
ALAPI void* ALAPIENTRY alGetProcAddress( const ALubyte* fname );
/**
* Extension support.
* Obtain the integer value of an enumeration (usually an extension) with the name ename.
*/
ALAPI ALenum ALAPIENTRY alGetEnumValue( const ALubyte* ename );
/**
* LISTENER
* Listener is the sample position for a given context.
* The multi-channel (usually stereo) output stream generated
* by the mixer is parametrized by this Listener object:
* its position and velocity relative to Sources, within
* occluder and reflector geometry.
*/
/**
*
* Listener Gain: default 1.0f.
*/
ALAPI void ALAPIENTRY alListenerf( ALenum pname, ALfloat param );
ALAPI void ALAPIENTRY alListeneri( ALenum pname, ALint param );
/**
*
* Listener Position: ALfloat[3]
* Listener Velocity: ALfloat[3]
*/
ALAPI void ALAPIENTRY alListener3f( ALenum pname,
ALfloat f1, ALfloat f2, ALfloat f3 );
/**
*
* Listener Position: ALfloat[3]
* Listener Velocity: ALfloat[3]
* Listener Orientation: ALfloat[6] (forward and up vector).
*/
ALAPI void ALAPIENTRY alListenerfv( ALenum pname, ALfloat* param );
/*
* Retrieve listener information.
*/
ALAPI void ALAPIENTRY alGetListeneri( ALenum pname, ALint* value );
ALAPI void ALAPIENTRY alGetListenerf( ALenum pname, ALfloat* value );
ALAPI void ALAPIENTRY alGetListeneriv( ALenum pname, ALint* value );
ALAPI void ALAPIENTRY alGetListenerfv( ALenum pname, ALfloat* values );
ALAPI void ALAPIENTRY alGetListener3f( ALenum pname,
ALfloat *f1, ALfloat *f2, ALfloat *f3 );
/**
* SOURCE
* Source objects are by default localized. Sources
* take the PCM data provided in the specified Buffer,
* apply Source-specific modifications, and then
* submit them to be mixed according to spatial
* arrangement etc.
*/
/** Create Source objects. */
ALAPI void ALAPIENTRY alGenSources( ALsizei n, ALuint* sources );
/** Delete Source objects. */
ALAPI void ALAPIENTRY alDeleteSources( ALsizei n, ALuint* sources );
/** Verify a handle is a valid Source. */
ALAPI ALboolean ALAPIENTRY alIsSource( ALuint sid );
/** Set an integer parameter for a Source object. */
ALAPI void ALAPIENTRY alSourcei( ALuint sid, ALenum param, ALint value );
ALAPI void ALAPIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value );
ALAPI void ALAPIENTRY alSource3f( ALuint sid, ALenum param,
ALfloat f1, ALfloat f2, ALfloat f3 );
ALAPI void ALAPIENTRY alSourcefv( ALuint sid, ALenum param, ALfloat* values );
/** Get an integer parameter for a Source object. */
ALAPI void ALAPIENTRY alGetSourcei( ALuint sid, ALenum pname, ALint* value );
ALAPI void ALAPIENTRY alGetSourceiv( ALuint sid, ALenum pname, ALint* values );
ALAPI void ALAPIENTRY alGetSourcef( ALuint sid, ALenum pname, ALfloat* value );
ALAPI void ALAPIENTRY alGetSourcefv( ALuint sid, ALenum pname, ALfloat* values );
/* deprecated, included for Win compatibility */
ALAPI void ALAPIENTRY alGetSource3f( ALuint sid, ALenum pname, ALfloat* value1,
ALfloat* value2, ALfloat* value3);
ALAPI void ALAPIENTRY alSourcePlayv( ALsizei ns, ALuint *ids );
ALAPI void ALAPIENTRY alSourceStopv( ALsizei ns, ALuint *ids );
ALAPI void ALAPIENTRY alSourceRewindv( ALsizei ns, ALuint *ids );
ALAPI void ALAPIENTRY alSourcePausev( ALsizei ns, ALuint *ids );
/** Activate a source, start replay. */
ALAPI void ALAPIENTRY alSourcePlay( ALuint sid );
/**
* Pause a source,
* temporarily remove it from the mixer list.
*/
ALAPI void ALAPIENTRY alSourcePause( ALuint sid );
/**
* Rewind a source,
* set the source to play at the beginning.
*/
ALAPI void ALAPIENTRY alSourceRewind( ALuint sid );
/**
* Stop a source,
* temporarily remove it from the mixer list,
* and reset its internal state to pre-Play.
* To remove a Source completely, it has to be
* deleted following Stop, or before Play.
*/
ALAPI void ALAPIENTRY alSourceStop( ALuint sid );
/**
* BUFFER
* Buffer objects are storage space for sample data.
* Buffers are referred to by Sources. There can be more than
* one Source using the same Buffer data. If Buffers have
* to be duplicated on a per-Source basis, the driver has to
* take care of allocation, copying, and deallocation as well
* as propagating buffer data changes.
*/
/** Buffer object generation. */
ALAPI void ALAPIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
ALAPI void ALAPIENTRY alDeleteBuffers( ALsizei n, ALuint* buffers );
ALAPI ALboolean ALAPIENTRY alIsBuffer( ALuint buffer );
/**
* Specify the data to be filled into a buffer.
*/
ALAPI void ALAPIENTRY alBufferData( ALuint buffer,
ALenum format,
ALvoid* data,
ALsizei size,
ALsizei freq );
ALAPI void ALAPIENTRY alGetBufferi( ALuint buffer, ALenum param, ALint* value );
ALAPI void ALAPIENTRY alGetBufferf( ALuint buffer, ALenum param, ALfloat* value );
ALAPI void ALAPIENTRY alGetBufferiv( ALuint buffer, ALenum param, ALint *v);
ALAPI void ALAPIENTRY alGetBufferfv( ALuint buffer, ALenum param, ALfloat *v);
/**
* Frequency Domain Filters are band filters.
* Attenuation in Media (distance based)
* Reflection Material
* Occlusion Material (separating surface)
*
* Temporal Domain Filters:
* Early Reflections
* Late Reverb
*
*/
/**
* EXTENSION: IASIG Level 2 Environment.
* Environment object generation.
* This is an EXTension that describes the Environment/Reverb
* properties according to IASIG Level 2 specifications.
*/
/**
* Allocate n environment ids and store them in the array environs.
* Returns the number of environments actually allocated.
*/
ALAPI ALsizei ALAPIENTRY alGenEnvironmentIASIG( ALsizei n, ALuint* environs );
ALAPI void ALAPIENTRY alDeleteEnvironmentIASIG( ALsizei n, ALuint* environs );
ALAPI ALboolean ALAPIENTRY alIsEnvironmentIASIG( ALuint environ );
ALAPI void ALAPIENTRY alEnvironmentiIASIG( ALuint eid, ALenum param, ALint value );
ALAPI void ALAPIENTRY alEnvironmentfIASIG( ALuint eid, ALenum param, ALfloat value );
/**
* Queue stuff
*/
ALAPI void ALAPIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
ALAPI void ALAPIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
ALAPI void ALAPIENTRY alQueuei( ALuint sid, ALenum param, ALint value );
/**
* Knobs and dials
*/
ALAPI void ALAPIENTRY alDopplerFactor( ALfloat value );
ALAPI void ALAPIENTRY alDopplerVelocity( ALfloat value );
ALAPI void ALAPIENTRY alDistanceModel( ALenum distanceModel );
#else /* AL_NO_PROTOTYPES */
/** OpenAL Maintenance Functions */
void (*alEnable)( ALenum capability );
void (*alDisable)( ALenum capability );
ALboolean (*alIsEnabled)( ALenum capability );
void (*alHint)( ALenum target, ALenum mode );
ALboolean (*alGetBoolean)( ALenum param );
ALint (*alGetInteger)( ALenum param );
ALfloat (*alGetFloat)( ALenum param );
ALdouble (*alGetDouble)( ALenum param );
void (*alGetBooleanv)( ALenum param,
ALboolean* data );
void (*alGetIntegerv)( ALenum param,
ALint* data );
void (*alGetFloatv)( ALenum param,
ALfloat* data );
void (*alGetDoublev)( ALenum param,
ALdouble* data );
const ALubyte* (*GetString)( ALenum param );
ALenum (*alGetError)( ALvoid );
/**
* Extension support.
* Query existance of extension
*/
ALboolean (*alIsExtensionPresent)(const ALubyte* fname );
/**
* Extension support.
* Obtain the address of a function (usually an extension)
* with the name fname. All addresses are context-independent.
*/
void* (*alGetProcAddress)( const ALubyte* fname );
/**
* Extension support.
* Obtain the integer value of an enumeration (usually an extension) with the name ename.
*/
ALenum (*alGetEnumValue)( const ALubyte* ename );
/**
* LISTENER
* Listener is the sample position for a given context.
* The multi-channel (usually stereo) output stream generated
* by the mixer is parametrized by this Listener object:
* its position and velocity relative to Sources, within
* occluder and reflector geometry.
*/
/**
*
* Listener Gain: default 1.0f.
*/
void (*alListenerf)( ALenum pname, ALfloat param );
/**
*
* Listener Position: ALfloat[3]
* Listener Velocity: ALfloat[3]
* Listener Orientation: ALfloat[6] (forward and up vector).
*/
void (*alListenerfv)( ALenum pname, ALfloat* param );
/*
* Retrieve listener information.
*/
void (*alGetListeneri)( ALenum pname, ALint* value );
void (*alGetListenerf)( ALenum pname, ALfloat* value );
void (*alGetListeneriv)( ALenum pname, ALint* values );
void (*alGetListenerfv)( ALenum pname, ALfloat* values );
/**
* SOURCE
* Source objects are by default localized. Sources
* take the PCM data provided in the specified Buffer,
* apply Source-specific modifications, and then
* submit them to be mixed according to spatial
* arrangement etc.
*/
/** Create Source objects. */
void (*alGenSources)( ALsizei n, ALuint* sources );
/** Delete Source objects. */
void (*alDeleteSources)( ALsizei n, ALuint* sources );
/** Verify a handle is a valid Source. */
ALboolean (*alIsSource)( ALuint sid );
/** Set an integer parameter for a Source object. */
void (*alSourcei)( ALuint sid, ALenum param, ALint value);
/** Set a float parameter for a Source object. */
void (*alSourcef)( ALuint sid, ALenum param, ALfloat value);
/** Set a 3 float parameter for a Source object. */
void (*alSource3f)( ALuint sid, ALenum param,
ALfloat f1, ALfloat f2, ALfloat f3 );
/** Set a float vector parameter for a Source object. */
void (*alSourcefv)( ALuint sid, ALenum param,
ALfloat* values );
/** Get an integer scalar parameter for a Source object. */
void (*alGetSourcei)( ALuint sid,
ALenum pname, ALint* value );
/** Get an integer parameter for a Source object. */
void (*alGetSourceiv)( ALuint sid,
ALenum pname, ALint* values );
/** Get a float scalar parameter for a Source object. */
void (*alGetSourcef)( ALuint sid,
ALenum pname, ALfloat* value );
/** Get three float scalar parameter for a Source object. */
void (*alGetSource3f)( ALuint sid, ALenum pname,
ALfloat* value1,
ALfloat* value2,
ALfloat* value3);
/** Get a float vector parameter for a Source object. */
void (*alGetSourcefv)( ALuint sid,
ALenum pname, ALfloat* values );
/** Activate a source, start replay. */
void (*alSourcePlay)( ALuint sid );
/**
* Pause a source,
* temporarily remove it from the mixer list.
*/
void (*alSourcePause)( ALuint sid );
/**
* Stop a source,
* temporarily remove it from the mixer list,
* and reset its internal state to pre-Play.
* To remove a Source completely, it has to be
* deleted following Stop, or before Play.
*/
void (*alSourceStop)( ALuint sid );
/**
* Rewind a souce. Stopped paused and playing sources,
* resets the offset into the PCM data and sets state to
* AL_INITIAL.
*/
void (*alSourceRewind)( ALuint sid );
/**
* vector forms of those functions we all love
*/
void (*alSourcePlayv)( ALsizei ns, ALuint *ids );
void (*alSourceStopv)( ALsizei ns, ALuint *ids );
void (*alSourceRewindv)( ALsizei ns, ALuint *ids );
void (*alSourcePausev)( ALsizei ns, ALuint *ids );
/**
* BUFFER
* Buffer objects are storage space for sample data.
* Buffers are referred to by Sources. There can be more than
* one Source using the same Buffer data. If Buffers have
* to be duplicated on a per-Source basis, the driver has to
* take care of allocation, copying, and deallocation as well
* as propagating buffer data changes.
*/
/** Buffer object generation. */
void (*alGenBuffers)( ALsizei n, ALuint* buffers );
void (*alDeleteBuffers)( ALsizei n, ALuint* buffers );
ALboolean (*alIsBuffer)( ALuint buffer );
/**
* Specify the data to be filled into a buffer.
*/
void (*alBufferData)( ALuint buffer,
ALenum format,
ALvoid* data,
ALsizei size,
ALsizei freq );
void (*alGetBufferi)( ALuint buffer,
ALenum param, ALint* value );
void (*alGetBufferf)( ALuint buffer,
ALenum param, ALfloat* value );
void (*alGetBufferiv)( ALuint buffer,
ALenum param, ALint* value );
void (*alGetBufferfv)( ALuint buffer,
ALenum param, ALfloat* value );
/**
* EXTENSION: IASIG Level 2 Environment.
* Environment object generation.
* This is an EXTension that describes the Environment/Reverb
* properties according to IASIG Level 2 specifications.
*/
/**
* Allocate n environment ids and store them in the array environs.
* Returns the number of environments actually allocated.
*/
ALsizei (*alGenEnvironmentIASIG)( ALsizei n, ALuint* environs );
void (*alDeleteEnvironmentIASIG)(ALsizei n,
ALuint* environs);
ALboolean (*alIsEnvironmentIASIG)( ALuint environ );
void (*alEnvironmentiIASIG)( ALuint eid,
ALenum param, ALint value );
void (*alEnvironmentfIASIG)( ALuint eid,
ALenum param, ALuint value );
/**
* Queue stuff
*/
void (*alQueuei)(ALuint sid, ALenum param, ALint value );
void (*alSourceUnqueueBuffers)(ALuint sid, ALsizei numEntries, ALuint *bids );
void (*alSourceQueueBuffers)(ALuint sid, ALsizei numEntries, ALuint *bids );
void (*alDopplerFactor)( ALfloat value );
void (*alDopplerVelocity)( ALfloat value );
void (*alDistanceModel)( ALenum distanceModel );
/**
* Frequency Domain Filters are band filters.
* Attenuation in Media (distance based)
* Reflection Material
* Occlusion Material (separating surface)
*
* Temporal Domain Filters:
* Early Reflections
* Late Reverb
*
*/
#endif /* AL_NO_PROTOTYPES */
#ifdef TARGET_OS_MAC
#if TARGET_OS_MAC
#pragma export off
#endif /* TARGET_OS_MAC */
#endif /* TARGET_OS_MAC */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* __al_h_ */
|