DEADSOFTWARE

sdl: fix build on linux
[d2df-sdl.git] / src / lib / openal / alc.inc
1 (*
2 * The ALCAPI, ALCAPIENTRY, and ALC_INVALID macros are deprecated, but are
3 * included for applications porting code from AL 1.0
4 *)
6 { ALCAPI ALC_API
7 ALCAPIENTRY ALC_APIENTRY
8 ALC_INVALID = 0;
11 ALC_VERSION_0_1 = 1;}
13 type
14 PALCdevice = ^ALCdevice;
15 ALCdevice = record
16 end;
18 PALCcontext = ^ALCcontext;
19 ALCcontext = record
20 end;
23 (** 8-bit boolean *)
24 ALCboolean = cbool;
25 PALCboolean = pcbool;
27 (** character *)
28 ALCchar = char;
29 PALCchar = pchar;
31 (** signed 8-bit 2's complement integer *)
32 ALCbyte = cint8;
33 PALCbyte = pcint8;
35 (** unsigned 8-bit integer *)
36 ALCubyte = cuint8;
37 PALCubyte = pcuint8;
39 (** signed 16-bit 2's complement integer *)
40 ALCshort = cint16;
41 PALCshort = pcint16;
43 (** unsigned 16-bit integer *)
44 ALCushort = cuint16;
45 PALCushort = pcuint16;
47 (** signed 32-bit 2's complement integer *)
48 ALCint = cint32;
49 PALCint = pcint32;
51 (** unsigned 32-bit integer *)
52 ALCuint = cuint32;
53 PALCuint = pcuint32;
55 (** non-negative 32-bit binary integer size *)
56 ALCsizei = cint32;
57 PALCsizei = pcint32;
59 (** enumerated 32-bit value *)
60 ALCenum = cint32;
61 PALCenum = pcint32;
63 (** 32-bit IEEE754 floating-point *)
64 ALCfloat = cfloat;
65 PALCfloat = pcfloat;
67 (** 64-bit IEEE754 floating-point *)
68 ALCdouble = cdouble;
69 PALCdouble = pcdouble;
71 (** void type (for opaque pointers only) *)
72 PALCvoid = pointer;
75 (* Enumerant values begin at column 50. No tabs. *)
76 const
78 (* Boolean False. *)
79 ALC_FALSE = 0;
81 (* Boolean True. *)
82 ALC_TRUE = 1;
84 (**
85 * followed by <int> Hz
86 *)
87 ALC_FREQUENCY = $1007;
89 (**
90 * followed by <int> Hz
91 *)
92 ALC_REFRESH = $1008;
94 (**
95 * followed by AL_TRUE, AL_FALSE
96 *)
97 ALC_SYNC = $1009;
99 (**
100 * followed by <int> Num of requested Mono (3D) Sources
101 *)
102 ALC_MONO_SOURCES = $1010;
104 (**
105 * followed by <int> Num of requested Stereo Sources
106 *)
107 ALC_STEREO_SOURCES = $1011;
109 (**
110 * errors
111 *)
113 (**
114 * No error
115 *)
116 ALC_NO_ERROR = ALC_FALSE;
118 (**
119 * No device
120 *)
121 ALC_INVALID_DEVICE = $A001;
123 (**
124 * invalid context ID
125 *)
126 ALC_INVALID_CONTEXT = $A002;
128 (**
129 * bad enum
130 *)
131 ALC_INVALID_ENUM = $A003;
133 (**
134 * bad value
135 *)
136 ALC_INVALID_VALUE = $A004;
138 (**
139 * Out of memory.
140 *)
141 ALC_OUT_OF_MEMORY = $A005;
144 (**
145 * The Specifier string for default device
146 *)
147 ALC_DEFAULT_DEVICE_SPECIFIER = $1004;
148 ALC_DEVICE_SPECIFIER = $1005;
149 ALC_EXTENSIONS = $1006;
151 ALC_MAJOR_VERSION = $1000;
152 ALC_MINOR_VERSION = $1001;
154 ALC_ATTRIBUTES_SIZE = $1002;
155 ALC_ALL_ATTRIBUTES = $1003;
157 (**
158 * Capture extension
159 *)
160 ALC_CAPTURE_DEVICE_SPECIFIER = $310;
161 ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = $311;
162 ALC_CAPTURE_SAMPLES = $312;
165 (*
166 * Context Management
167 *)
168 function alcCreateContext(device: PALCdevice; const attrlist: PALCint): PALCcontext; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
170 function alcMakeContextCurrent(context: PALCcontext): ALCboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
172 procedure alcProcessContext(context: PALCcontext); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
174 procedure alcSuspendContext(context: PALCcontext); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
176 procedure alcDestroyContext(context: PALCcontext); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
178 function alcGetCurrentContext: PALCcontext; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
180 function alcGetContextsDevice(context: PALCcontext): PALCdevice; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
183 (*
184 * Device Management
185 *)
186 function alcOpenDevice(const devicename: PALCchar): PALCdevice; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
188 function alcCloseDevice(device: PALCdevice): ALCboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
191 (*
192 * Error support.
193 * Obtain the most recent Context error
194 *)
195 function alcGetError(device: PALCdevice): ALCenum; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
198 (*
199 * Extension support.
200 * Query for the presence of an extension, and obtain any appropriate
201 * function pointers and enum values.
202 *)
203 function alcIsExtensionPresent(device: PALCdevice; const extname: PALCchar): ALCboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
205 function alcGetProcAddress(device: PALCdevice; const funcname: PALCchar): pointer; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
207 function alcGetEnumValue(device: PALCdevice; const enumname: PALCchar): ALCenum; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
210 (*
211 * Query functions
212 *)
213 function alcGetString(device: PALCdevice; param: ALCenum): PALCchar; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
215 procedure alcGetIntegerv(device: PALCdevice; param: ALCenum; size: ALCsizei; data: PALCint); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
218 (*
219 * Capture functions
220 *)
221 function alcCaptureOpenDevice(const devicename: PALCchar; frequency: ALCuint; format: ALCenum; buffersize: ALCsizei): PALCdevice; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
223 function alcCaptureCloseDevice(device: PALCdevice): ALCboolean; cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
225 procedure alcCaptureStart(device: PALCdevice); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
227 procedure alcCaptureStop(device: PALCdevice); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
229 procedure alcCaptureSamples(device: PALCdevice; buffer: PALCvoid; samples: ALCsizei); cdecl; external {$IFDEF AL_DYNAMIC}openallib{$ENDIF};
231 (*
232 * Pointer-to-function types, useful for dynamically getting ALC entry points.
233 *)
235 type
236 LPALCCREATECONTEXT = function(ALCdevice *device, const ALCint *attrlist): PALCcontext; cdecl;
237 LPALCMAKECONTEXTCURRENT = function( ALCcontext *context ): ALCboolean; cdecl;
238 LPALCPROCESSCONTEXT = procedure( ALCcontext *context ); cdecl;
239 LPALCSUSPENDCONTEXT = procedure( ALCcontext *context ); cdecl;
240 LPALCDESTROYCONTEXT = procedure( ALCcontext *context ); cdecl;
241 LPALCGETCURRENTCONTEXT = function( ALCvoid ): PALCcontext; cdecl;
242 LPALCGETCONTEXTSDEVICE = function( ALCcontext *context ): PALCdevice; cdecl;
243 LPALCOPENDEVICE = function( const ALCchar *devicename ): PALCdevice; cdecl;
244 LPALCCLOSEDEVICE = function( ALCdevice *device ): ALCboolean; cdecl;
245 LPALCGETERROR = function( ALCdevice *device ): ALCenum; cdecl;
246 LPALCISEXTENSIONPRESENT = function( ALCdevice *device, const ALCchar *extname ): ALCboolean; cdecl;
247 LPALCGETPROCADDRESS = function(ALCdevice *device, const ALCchar *funcname ): pointer; cdecl;
248 LPALCGETENUMVALUE = function(ALCdevice *device, const ALCchar *enumname ): ALCenum; cdecl;
249 LPALCGETSTRING = function( ALCdevice *device, ALCenum param ): PALCchar; cdecl;
250 LPALCGETINTEGERV = procedure(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest ); cdecl;
251 LPALCCAPTUREOPENDEVICE = function( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ): PALCdevice; cdecl;
252 LPALCCAPTURECLOSEDEVICE = function( ALCdevice *device ): ALCboolean; cdecl;
253 LPALCCAPTURESTART = procedure( ALCdevice *device ); cdecl;
254 LPALCCAPTURESTOP = procedure( ALCdevice *device ); cdecl;
255 LPALCCAPTURESAMPLES = procedure( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); cdecl;