DEADSOFTWARE

Sound: Initial OpenAL driver impl
[d2df-sdl.git] / src / lib / openal / al.inc
1 (**
2 * OpenAL cross platform audio library
3 * Copyright (C) 1999-2000 by authors.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 * Or go to http://www.gnu.org/copyleft/lgpl.html
19 *)
22 (*
23 * The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and
24 * AL_ILLEGAL_COMMAND macros are deprecated, but are included for
25 * applications porting code from AL 1.0
26 *)
28 { OPENAL
29 ALAPI AL_API
30 ALAPIENTRY AL_APIENTRY
31 AL_INVALID = (-1);
32 AL_ILLEGAL_ENUM = AL_INVALID_ENUM;
33 AL_ILLEGAL_COMMAND = AL_INVALID_OPERATION;
35 AL_VERSION_1_0
36 AL_VERSION_1_1}
39 type
41 (** 8-bit boolean *)
42 ALboolean = cbool;
43 PALboolean = pcbool;
45 (** character *)
46 ALchar = char;
47 PALchar = pchar;
49 (** signed 8-bit 2's complement integer *)
50 ALbyte = cint8;
51 PALbyte = pcint8;
53 (** unsigned 8-bit integer *)
54 ALubyte = cuint8;
55 PALubyte = pcuint8;
57 (** signed 16-bit 2's complement integer *)
58 ALshort = cint16;
59 PALshort = pcint16;
61 (** unsigned 16-bit integer *)
62 ALushort = cuint16;
63 PALushort = pcuint16;
65 (** signed 32-bit 2's complement integer *)
66 ALint = cint32;
67 PALint = pcint32;
69 (** unsigned 32-bit integer *)
70 ALuint = cuint32;
71 PALuint = pcuint32;
73 (** non-negative 32-bit binary integer size *)
74 ALsizei = cint32;
75 PALsizei = pcint32;
77 (** enumerated 32-bit value *)
78 ALenum = cint32;
79 PALenum = pcint32;
81 (** 32-bit IEEE754 floating-point *)
82 ALfloat = cfloat;
83 PALfloat = pcfloat;
85 (** 64-bit IEEE754 floating-point *)
86 ALdouble = cdouble;
87 PALdouble = pcdouble;
89 (** void type (for opaque pointers only) *)
90 PALvoid = pointer;
93 (* Enumerant values begin at column 50. No tabs. *)
95 const
96 (* "no distance model" or "no buffer" *)
97 AL_NONE = 0;
99 (* Boolean False. *)
100 AL_FALSE = 0;
102 (** Boolean True. *)
103 AL_TRUE = 1;
105 (** Indicate Source has relative coordinates. *)
106 AL_SOURCE_RELATIVE = $202;
110 (**
111 * Directional source, inner cone angle, in degrees.
112 * Range: [0-360]
113 * Default: 360
114 *)
115 AL_CONE_INNER_ANGLE = $1001;
117 (**
118 * Directional source, outer cone angle, in degrees.
119 * Range: [0-360]
120 * Default: 360
121 *)
122 AL_CONE_OUTER_ANGLE = $1002;
124 (**
125 * Specify the pitch to be applied, either at source,
126 * or on mixer results, at listener.
127 * Range: [0.5-2.0]
128 * Default: 1.0
129 *)
130 AL_PITCH = $1003;
132 (**
133 * Specify the current location in three dimensional space.
134 * OpenAL, like OpenGL, uses a right handed coordinate system,
135 * where in a frontal default view X (thumb) points right,
136 * Y points up (index finger), and Z points towards the
137 * viewer/camera (middle finger).
138 * To switch from a left handed coordinate system, flip the
139 * sign on the Z coordinate.
140 * Listener position is always in the world coordinate system.
141 *)
142 AL_POSITION = $1004;
144 (** Specify the current direction. *)
145 AL_DIRECTION = $1005;
147 (** Specify the current velocity in three dimensional space. *)
148 AL_VELOCITY = $1006;
150 (**
151 * Indicate whether source is looping.
152 * Type: ALboolean?
153 * Range: [AL_TRUE, AL_FALSE]
154 * Default: FALSE.
155 *)
156 AL_LOOPING = $1007;
158 (**
159 * Indicate the buffer to provide sound samples.
160 * Type: ALuint.
161 * Range: any valid Buffer id.
162 *)
163 AL_BUFFER = $1009;
165 (**
166 * Indicate the gain (volume amplification) applied.
167 * Type: ALfloat.
168 * Range: ]0.0- ]
169 * A value of 1.0 means un-attenuated/unchanged.
170 * Each division by 2 equals an attenuation of -6dB.
171 * Each multiplicaton with 2 equals an amplification of +6dB.
172 * A value of 0.0 is meaningless with respect to a logarithmic
173 * scale; it is interpreted as zero volume - the channel
174 * is effectively disabled.
175 *)
176 AL_GAIN = $100A;
178 (*
179 * Indicate minimum source attenuation
180 * Type: ALfloat
181 * Range: [0.0 - 1.0]
183 * Logarthmic
184 *)
185 AL_MIN_GAIN = $100D;
187 (**
188 * Indicate maximum source attenuation
189 * Type: ALfloat
190 * Range: [0.0 - 1.0]
192 * Logarthmic
193 *)
194 AL_MAX_GAIN = $100E;
196 (**
197 * Indicate listener orientation.
199 * at/up
200 *)
201 AL_ORIENTATION = $100F;
203 (**
204 * Source state information.
205 *)
206 AL_SOURCE_STATE = $1010;
207 AL_INITIAL = $1011;
208 AL_PLAYING = $1012;
209 AL_PAUSED = $1013;
210 AL_STOPPED = $1014;
212 (**
213 * Buffer Queue params
214 *)
215 AL_BUFFERS_QUEUED = $1015;
216 AL_BUFFERS_PROCESSED = $1016;
218 (**
219 * Source buffer position information
220 *)
221 AL_SEC_OFFSET = $1024;
222 AL_SAMPLE_OFFSET = $1025;
223 AL_BYTE_OFFSET = $1026;
225 (*
226 * Source type (Static, Streaming or undetermined)
227 * Source is Static if a Buffer has been attached using AL_BUFFER
228 * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
229 * Source is undetermined when it has the NULL buffer attached
230 *)
231 AL_SOURCE_TYPE = $1027;
232 AL_STATIC = $1028;
233 AL_STREAMING = $1029;
234 AL_UNDETERMINED = $1030;
236 (** Sound samples: format specifier. *)
237 AL_FORMAT_MONO8 = $1100;
238 AL_FORMAT_MONO16 = $1101;
239 AL_FORMAT_STEREO8 = $1102;
240 AL_FORMAT_STEREO16 = $1103;
242 (**
243 * source specific reference distance
244 * Type: ALfloat
245 * Range: 0.0 - +inf
247 * At 0.0, no distance attenuation occurs. Default is
248 * 1.0.
249 *)
250 AL_REFERENCE_DISTANCE = $1020;
252 (**
253 * source specific rolloff factor
254 * Type: ALfloat
255 * Range: 0.0 - +inf
257 *)
258 AL_ROLLOFF_FACTOR = $1021;
260 (**
261 * Directional source, outer cone gain.
263 * Default: 0.0
264 * Range: [0.0 - 1.0]
265 * Logarithmic
266 *)
267 AL_CONE_OUTER_GAIN = $1022;
269 (**
270 * Indicate distance above which sources are not
271 * attenuated using the inverse clamped distance model.
273 * Default: +inf
274 * Type: ALfloat
275 * Range: 0.0 - +inf
276 *)
277 AL_MAX_DISTANCE = $1023;
279 (**
280 * Sound samples: frequency, in units of Hertz [Hz].
281 * This is the number of samples per second. Half of the
282 * sample frequency marks the maximum significant
283 * frequency component.
284 *)
285 AL_FREQUENCY = $2001;
286 AL_BITS = $2002;
287 AL_CHANNELS = $2003;
288 AL_SIZE = $2004;
290 (**
291 * Buffer state.
293 * Not supported for public use (yet).
294 *)
295 AL_UNUSED = $2010;
296 AL_PENDING = $2011;
297 AL_PROCESSED = $2012;
300 (** Errors: No Error. *)
301 AL_NO_ERROR = AL_FALSE;
303 (**
304 * Invalid Name paramater passed to AL call.
305 *)
306 AL_INVALID_NAME = $A001;
308 (**
309 * Invalid parameter passed to AL call.
310 *)
311 AL_INVALID_ENUM = $A002;
313 (**
314 * Invalid enum parameter value.
315 *)
316 AL_INVALID_VALUE = $A003;
318 (**
319 * Illegal call.
320 *)
321 AL_INVALID_OPERATION = $A004;
324 (**
325 * No mojo.
326 *)
327 AL_OUT_OF_MEMORY = $A005;
330 (** Context strings: Vendor Name. *)
331 AL_VENDOR = $B001;
332 AL_VERSION = $B002;
333 AL_RENDERER = $B003;
334 AL_EXTENSIONS = $B004;
336 (** Global tweakage. *)
338 (**
339 * Doppler scale. Default 1.0
340 *)
341 AL_DOPPLER_FACTOR = $C000;
343 (**
344 * Tweaks speed of propagation.
345 *)
346 AL_DOPPLER_VELOCITY = $C001;
348 (**
349 * Speed of Sound in units per second
350 *)
351 AL_SPEED_OF_SOUND = $C003;
353 (**
354 * Distance models
356 * used in conjunction with DistanceModel
358 * implicit: NONE, which disances distance attenuation.
359 *)
360 AL_DISTANCE_MODEL = $D000;
361 AL_INVERSE_DISTANCE = $D001;
362 AL_INVERSE_DISTANCE_CLAMPED = $D002;
363 AL_LINEAR_DISTANCE = $D003;
364 AL_LINEAR_DISTANCE_CLAMPED = $D004;
365 AL_EXPONENT_DISTANCE = $D005;
366 AL_EXPONENT_DISTANCE_CLAMPED = $D006;
368 (*
369 * Renderer State management
370 *)
371 procedure alEnable(capability: ALenum); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
373 procedure alDisable(capability: ALenum); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
375 function alIsEnabled(capability: ALenum): ALboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
378 (*
379 * State retrieval
380 *)
381 function alGetString(param: ALenum): PALchar; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
383 procedure alGetBooleanv(param: ALenum; data: PALboolean); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
385 procedure alGetIntegerv(param: ALenum; data: PALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
387 procedure alGetFloatv(param: ALenum; data: PALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
389 procedure alGetDoublev(param: ALenum; data: PALdouble); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
391 function alGetBoolean(param: ALenum): ALboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
393 function alGetInteger(param: ALenum): ALint; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
395 function alGetFloat(param: ALenum): ALfloat; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
397 function alGetDouble(param: ALenum): ALdouble; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
400 (*
401 * Error support.
402 * Obtain the most recent error generated in the AL state machine.
403 *)
404 function alGetError: ALenum; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
407 (*
408 * Extension support.
409 * Query for the presence of an extension, and obtain any appropriate
410 * function pointers and enum values.
411 *)
412 function alIsExtensionPresent(const extname: PALChar): ALboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
414 function alGetProcAddress(const fname: PALChar): pointer; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
416 function alGetEnumValue(const ename: PALChar): ALenum; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
419 (*
420 * LISTENER
421 * Listener represents the location and orientation of the
422 * 'user' in 3D-space.
424 * Properties include: -
426 * Gain AL_GAIN ALfloat
427 * Position AL_POSITION ALfloat[3]
428 * Velocity AL_VELOCITY ALfloat[3]
429 * Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors)
430 *)
432 (*
433 * Set Listener parameters
434 *)
435 procedure alListenerf(param: ALenum; value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
437 procedure alListener3f(param: ALenum; value1, value2, value3: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
439 procedure alListenerfv(param: ALenum; const values: PALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
441 procedure alListeneri(param: ALenum; value: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
443 procedure alListener3i(param: ALenum; value1, value2, value3: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
445 procedure alListeneriv(param: ALenum; const values: PALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
447 (*
448 * Get Listener parameters
449 *)
450 procedure alGetListenerf(param: ALenum; var value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
452 procedure alGetListener3f(param: ALenum; var value1, value2, value3: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
454 procedure alGetListenerfv(param: ALenum; values: PALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
456 procedure alGetListeneri(param: ALenum; var value: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
458 procedure alGetListener3i(param: ALenum; var value1, value2, value3: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
460 procedure alGetListeneriv(param: ALenum; values: PALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
463 (**
464 * SOURCE
465 * Sources represent individual sound objects in 3D-space.
466 * Sources take the PCM data provided in the specified Buffer,
467 * apply Source-specific modifications, and then
468 * submit them to be mixed according to spatial arrangement etc.
469 *
470 * Properties include: -
472 * Gain AL_GAIN ALfloat
473 * Min Gain AL_MIN_GAIN ALfloat
474 * Max Gain AL_MAX_GAIN ALfloat
475 * Position AL_POSITION ALfloat[3]
476 * Velocity AL_VELOCITY ALfloat[3]
477 * Direction AL_DIRECTION ALfloat[3]
478 * Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE)
479 * Reference Distance AL_REFERENCE_DISTANCE ALfloat
480 * Max Distance AL_MAX_DISTANCE ALfloat
481 * RollOff Factor AL_ROLLOFF_FACTOR ALfloat
482 * Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat
483 * Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat
484 * Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat
485 * Pitch AL_PITCH ALfloat
486 * Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE)
487 * MS Offset AL_MSEC_OFFSET ALint or ALfloat
488 * Byte Offset AL_BYTE_OFFSET ALint or ALfloat
489 * Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat
490 * Attached Buffer AL_BUFFER ALint
491 * State (Query only) AL_SOURCE_STATE ALint
492 * Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint
493 * Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint
494 *)
496 (* Create Source objects *)
497 procedure alGenSources(n: ALsizei; sources: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
499 (* Delete Source objects *)
500 procedure alDeleteSources(n: ALsizei; const sources: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
502 (* Verify a handle is a valid Source *)
503 function alIsSource(sid: ALuint): ALboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
505 (*
506 * Set Source parameters
507 *)
508 procedure alSourcef(sid: ALuint; param: ALenum; value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
510 procedure alSource3f(sid: ALuint; param: ALenum; value1, value2, value3: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
512 procedure alSourcefv(sid: ALuint; param: ALenum; const values: PALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
514 procedure alSourcei(sid: ALuint; param: ALenum; value: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
516 procedure alSource3i(sid: ALuint; param: ALenum; value1, value2, value3: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
518 procedure alSourceiv(sid: ALuint; param: ALenum; const values: PALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
520 (*
521 * Get Source parameters
522 *)
523 procedure alGetSourcef(sid: ALuint; param: ALenum; var value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
525 procedure alGetSource3f(sid: ALuint; param: ALenum; var value1, value2, value3: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
527 procedure alGetSourcefv(sid: ALuint; param: ALenum; values: PALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
529 procedure alGetSourcei(sid: ALuint; param: ALenum; var value: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
531 procedure alGetSource3i(sid: ALuint; param: ALenum; var value1, value2, value3: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
533 procedure alGetSourceiv(sid: ALuint; param: ALenum; values: PALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
536 (*
537 * Source vector based playback calls
538 *)
540 (* Play, replay, or resume (if paused) a list of Sources *)
541 procedure alSourcePlayv(ns: ALsizei; const sids: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
543 (* Stop a list of Sources *)
544 procedure alSourceStopv(ns: ALsizei; const sids: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
546 (* Rewind a list of Sources *)
547 procedure alSourceRewindv(ns: ALsizei; const sids: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
549 (* Pause a list of Sources *)
550 procedure alSourcePausev(ns: ALsizei; const sids: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
552 (*
553 * Source based playback calls
554 *)
556 (* Play, replay, or resume a Source *)
557 procedure alSourcePlay(sid: ALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
559 (* Stop a Source *)
560 procedure alSourceStop(sid: ALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
562 (* Rewind a Source (set playback postiton to beginning) *)
563 procedure alSourceRewind(sid: ALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
565 (* Pause a Source *)
566 procedure alSourcePause(sid: ALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
568 (*
569 * Source Queuing
570 *)
571 procedure alSourceQueueBuffers(sid: ALuint; numEntries: ALsizei; const bids: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
573 procedure alSourceUnqueueBuffers(sid: ALuint; numEntries: ALsizei; bids: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
576 (**
577 * BUFFER
578 * Buffer objects are storage space for sample data.
579 * Buffers are referred to by Sources. One Buffer can be used
580 * by multiple Sources.
582 * Properties include: -
584 * Frequency (Query only) AL_FREQUENCY ALint
585 * Size (Query only) AL_SIZE ALint
586 * Bits (Query only) AL_BITS ALint
587 * Channels (Query only) AL_CHANNELS ALint
588 *)
590 (* Create Buffer objects *)
591 procedure alGenBuffers(n: ALsizei; buffers: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
593 (* Delete Buffer objects *)
594 procedure alDeleteBuffers(n: ALsizei; const buffers: PALuint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
596 (* Verify a handle is a valid Buffer *)
597 function alIsBuffer(bid: ALuint): ALboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
599 (* Specify the data to be copied into a buffer *)
600 procedure alBufferData(bid: ALuint; format: ALenum; data: PALvoid; size: ALsizei; freq: ALsizei); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
602 (*
603 * Set Buffer parameters
604 *)
605 procedure alBufferf(bid: ALuint; param: ALenum; value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
607 procedure alBuffer3f(bid: ALuint; param: ALenum; value1, value2, value3: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
609 procedure alBufferfv(bid: ALuint; param: ALenum; const values: PALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
611 procedure alBufferi(bid: ALuint; param: ALenum; value: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
613 procedure alBuffer3i(bid: ALuint; param: ALenum; value1, value2, value3: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
615 procedure alBufferiv(bid: ALuint; param: ALenum; const values: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
617 (*
618 * Get Buffer parameters
619 *)
620 procedure alGetBufferf(bid: ALuint; param: ALenum; var value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
622 procedure alGetBuffer3f(bid: ALuint; param: ALenum; var value1, value2, value3: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
624 procedure alGetBufferfv(bid: ALuint; param: ALenum; values: PALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
626 procedure alGetBufferi(bid: ALuint; param: ALenum; var value: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
628 procedure alGetBuffer3i(bid: ALuint; param: ALenum; var value1, value2, value3: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
630 procedure alGetBufferiv(bid: ALuint; param: ALenum; values: ALint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
633 (*
634 * Global Parameters
635 *)
636 procedure alDopplerFactor(value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
638 procedure alDopplerVelocity(value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
640 procedure alSpeedOfSound(value: ALfloat); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
642 procedure alDistanceModel(distanceModel: ALenum); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
644 (*
645 * Pointer-to-function types, useful for dynamically getting AL entry points.
646 *)
648 type
649 LPALENABLE = procedure( ALenum capability ); cdecl;
650 LPALDISABLE = procedure( ALenum capability ); cdecl;
651 LPALISENABLED = function( ALenum capability ): ALboolean; cdecl;
652 LPALGETSTRING = function( ALenum param ): PALchar; cdecl;
653 LPALGETBOOLEANV = procedure( ALenum param, ALboolean* data ); cdecl;
654 LPALGETINTEGERV = procedure( ALenum param, ALint* data ); cdecl;
655 LPALGETFLOATV = procedure( ALenum param, ALfloat* data ); cdecl;
656 LPALGETDOUBLEV = procedure( ALenum param, ALdouble* data ); cdecl;
657 LPALGETBOOLEAN = function( ALenum param ): ALboolean; cdecl;
658 LPALGETINTEGER = function( ALenum param ): ALint; cdecl;
659 LPALGETFLOAT = function( ALenum param ): ALfloat; cdecl;
660 LPALGETDOUBLE = function( ALenum param ): ALdouble; cdecl;
661 LPALGETERROR = function( void ): ALenum; cdecl;
662 LPALISEXTENSIONPRESENT = function(const ALchar* extname ): ALboolean; cdecl;
663 LPALGETPROCADDRESS = function( const ALchar* fname ): pointer; cdecl;
664 LPALGETENUMVALUE = function( const ALchar* ename ): ALenum; cdecl;
665 LPALLISTENERF = procedure( ALenum param, ALfloat value ); cdecl;
666 LPALLISTENER3F = procedure( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); cdecl;
667 LPALLISTENERFV = procedure( ALenum param, const ALfloat* values ); cdecl;
668 LPALLISTENERI = procedure( ALenum param, ALint value ); cdecl;
669 LPALLISTENER3I = procedure( ALenum param, ALint value1, ALint value2, ALint value3 ); cdecl;
670 LPALLISTENERIV = procedure( ALenum param, const ALint* values ); cdecl;
671 LPALGETLISTENERF = procedure( ALenum param, ALfloat* value ); cdecl;
672 LPALGETLISTENER3F = procedure( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); cdecl;
673 LPALGETLISTENERFV = procedure( ALenum param, ALfloat* values ); cdecl;
674 LPALGETLISTENERI = procedure( ALenum param, ALint* value ); cdecl;
675 LPALGETLISTENER3I = procedure( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); cdecl;
676 LPALGETLISTENERIV = procedure( ALenum param, ALint* values ); cdecl;
677 LPALGENSOURCES = procedure( ALsizei n, ALuint* sources ); cdecl;
678 LPALDELETESOURCES = procedure( ALsizei n, const ALuint* sources ); cdecl;
679 LPALISSOURCE = function( ALuint sid ): ALboolean; cdecl;
680 LPALSOURCEF = procedure( ALuint sid, ALenum param, ALfloat value); cdecl;
681 LPALSOURCE3F = procedure( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); cdecl;
682 LPALSOURCEFV = procedure( ALuint sid, ALenum param, const ALfloat* values ); cdecl;
683 LPALSOURCEI = procedure( ALuint sid, ALenum param, ALint value); cdecl;
684 LPALSOURCE3I = procedure( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); cdecl;
685 LPALSOURCEIV = procedure( ALuint sid, ALenum param, const ALint* values ); cdecl;
686 LPALGETSOURCEF = procedure( ALuint sid, ALenum param, ALfloat* value ); cdecl;
687 LPALGETSOURCE3F = procedure( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); cdecl;
688 LPALGETSOURCEFV = procedure( ALuint sid, ALenum param, ALfloat* values ); cdecl;
689 LPALGETSOURCEI = procedure( ALuint sid, ALenum param, ALint* value ); cdecl;
690 LPALGETSOURCE3I = procedure( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); cdecl;
691 LPALGETSOURCEIV = procedure( ALuint sid, ALenum param, ALint* values ); cdecl;
692 LPALSOURCEPLAYV = procedure( ALsizei ns, const ALuint *sids ); cdecl;
693 LPALSOURCESTOPV = procedure( ALsizei ns, const ALuint *sids ); cdecl;
694 LPALSOURCEREWINDV = procedure( ALsizei ns, const ALuint *sids ); cdecl;
695 LPALSOURCEPAUSEV = procedure( ALsizei ns, const ALuint *sids ); cdecl;
696 LPALSOURCEPLAY = procedure( ALuint sid ); cdecl;
697 LPALSOURCESTOP = procedure( ALuint sid ); cdecl;
698 LPALSOURCEREWIND = procedure( ALuint sid ); cdecl;
699 LPALSOURCEPAUSE = procedure( ALuint sid ); cdecl;
700 LPALSOURCEQUEUEBUFFERS = procedure(ALuint sid, ALsizei numEntries, const ALuint *bids ); cdecl;
701 LPALSOURCEUNQUEUEBUFFERS = procedure(ALuint sid, ALsizei numEntries, ALuint *bids ); cdecl;
702 LPALGENBUFFERS = procedure( ALsizei n, ALuint* buffers ); cdecl;
703 LPALDELETEBUFFERS = procedure( ALsizei n, const ALuint* buffers ); cdecl;
704 LPALISBUFFER = function( ALuint bid ): ALboolean; cdecl;
705 LPALBUFFERDATA = procedure( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); cdecl;
706 LPALBUFFERF = procedure( ALuint bid, ALenum param, ALfloat value); cdecl;
707 LPALBUFFER3F = procedure( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); cdecl;
708 LPALBUFFERFV = procedure( ALuint bid, ALenum param, const ALfloat* values ); cdecl;
709 LPALBUFFERI = procedure( ALuint bid, ALenum param, ALint value); cdecl;
710 LPALBUFFER3I = procedure( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); cdecl;
711 LPALBUFFERIV = procedure( ALuint bid, ALenum param, const ALint* values ); cdecl;
712 LPALGETBUFFERF = procedure( ALuint bid, ALenum param, ALfloat* value ); cdecl;
713 LPALGETBUFFER3F = procedure( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); cdecl;
714 LPALGETBUFFERFV = procedure( ALuint bid, ALenum param, ALfloat* values ); cdecl;
715 LPALGETBUFFERI = procedure( ALuint bid, ALenum param, ALint* value ); cdecl;
716 LPALGETBUFFER3I = procedure( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); cdecl;
717 LPALGETBUFFERIV = procedure( ALuint bid, ALenum param, ALint* values ); cdecl;
718 LPALDOPPLERFACTOR = procedure( ALfloat value ); cdecl;
719 LPALDOPPLERVELOCITY = procedure( ALfloat value ); cdecl;
720 LPALSPEEDOFSOUND = procedure( ALfloat value ); cdecl;
721 LPALDISTANCEMODEL = procedure( ALenum distanceModel ); cdecl;