4 #if defined(__cplusplus)
9 #if defined(AL_LIBTYPE_STATIC)
12 #define ALC_API __declspec(dllimport)
14 #define ALC_API extern
19 #define ALC_APIENTRY __cdecl
25 /** Deprecated macro. */
26 #define ALCAPI ALC_API
27 #define ALCAPIENTRY ALC_APIENTRY
30 /** Supported ALC version? */
31 #define ALC_VERSION_0_1 1
33 /** Opaque device handle */
34 typedef struct ALCdevice_struct ALCdevice
;
35 /** Opaque context handle */
36 typedef struct ALCcontext_struct ALCcontext
;
39 typedef char ALCboolean
;
44 /** signed 8-bit 2's complement integer */
45 typedef signed char ALCbyte
;
47 /** unsigned 8-bit integer */
48 typedef unsigned char ALCubyte
;
50 /** signed 16-bit 2's complement integer */
51 typedef short ALCshort
;
53 /** unsigned 16-bit integer */
54 typedef unsigned short ALCushort
;
56 /** signed 32-bit 2's complement integer */
59 /** unsigned 32-bit integer */
60 typedef unsigned int ALCuint
;
62 /** non-negative 32-bit binary integer size */
65 /** enumerated 32-bit value */
68 /** 32-bit IEEE754 floating-point */
69 typedef float ALCfloat
;
71 /** 64-bit IEEE754 floating-point */
72 typedef double ALCdouble
;
74 /** void type (for opaque pointers only) */
78 /* Enumerant values begin at column 50. No tabs. */
86 /** Context attribute: <int> Hz. */
87 #define ALC_FREQUENCY 0x1007
89 /** Context attribute: <int> Hz. */
90 #define ALC_REFRESH 0x1008
92 /** Context attribute: AL_TRUE or AL_FALSE. */
93 #define ALC_SYNC 0x1009
95 /** Context attribute: <int> requested Mono (3D) Sources. */
96 #define ALC_MONO_SOURCES 0x1010
98 /** Context attribute: <int> requested Stereo Sources. */
99 #define ALC_STEREO_SOURCES 0x1011
102 #define ALC_NO_ERROR 0
104 /** Invalid device handle. */
105 #define ALC_INVALID_DEVICE 0xA001
107 /** Invalid context handle. */
108 #define ALC_INVALID_CONTEXT 0xA002
110 /** Invalid enum parameter passed to an ALC call. */
111 #define ALC_INVALID_ENUM 0xA003
113 /** Invalid value parameter passed to an ALC call. */
114 #define ALC_INVALID_VALUE 0xA004
116 /** Out of memory. */
117 #define ALC_OUT_OF_MEMORY 0xA005
120 /** Runtime ALC version. */
121 #define ALC_MAJOR_VERSION 0x1000
122 #define ALC_MINOR_VERSION 0x1001
124 /** Context attribute list properties. */
125 #define ALC_ATTRIBUTES_SIZE 0x1002
126 #define ALC_ALL_ATTRIBUTES 0x1003
128 /** String for the default device specifier. */
129 #define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
131 * String for the given device's specifier.
133 * If device handle is NULL, it is instead a null-char separated list of
134 * strings of known device specifiers (list ends with an empty string).
136 #define ALC_DEVICE_SPECIFIER 0x1005
137 /** String for space-separated list of ALC extensions. */
138 #define ALC_EXTENSIONS 0x1006
141 /** Capture extension */
142 #define ALC_EXT_CAPTURE 1
144 * String for the given capture device's specifier.
146 * If device handle is NULL, it is instead a null-char separated list of
147 * strings of known capture device specifiers (list ends with an empty string).
149 #define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
150 /** String for the default capture device specifier. */
151 #define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311
152 /** Number of sample frames available for capture. */
153 #define ALC_CAPTURE_SAMPLES 0x312
156 /** Enumerate All extension */
157 #define ALC_ENUMERATE_ALL_EXT 1
158 /** String for the default extended device specifier. */
159 #define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
161 * String for the given extended device's specifier.
163 * If device handle is NULL, it is instead a null-char separated list of
164 * strings of known extended device specifiers (list ends with an empty string).
166 #define ALC_ALL_DEVICES_SPECIFIER 0x1013
169 /** Context management. */
170 ALC_API ALCcontext
* ALC_APIENTRY
alcCreateContext(ALCdevice
*device
, const ALCint
* attrlist
);
171 ALC_API ALCboolean ALC_APIENTRY
alcMakeContextCurrent(ALCcontext
*context
);
172 ALC_API
void ALC_APIENTRY
alcProcessContext(ALCcontext
*context
);
173 ALC_API
void ALC_APIENTRY
alcSuspendContext(ALCcontext
*context
);
174 ALC_API
void ALC_APIENTRY
alcDestroyContext(ALCcontext
*context
);
175 ALC_API ALCcontext
* ALC_APIENTRY
alcGetCurrentContext(void);
176 ALC_API ALCdevice
* ALC_APIENTRY
alcGetContextsDevice(ALCcontext
*context
);
178 /** Device management. */
179 ALC_API ALCdevice
* ALC_APIENTRY
alcOpenDevice(const ALCchar
*devicename
);
180 ALC_API ALCboolean ALC_APIENTRY
alcCloseDevice(ALCdevice
*device
);
186 * Obtain the most recent Device error.
188 ALC_API ALCenum ALC_APIENTRY
alcGetError(ALCdevice
*device
);
193 * Query for the presence of an extension, and obtain any appropriate
194 * function pointers and enum values.
196 ALC_API ALCboolean ALC_APIENTRY
alcIsExtensionPresent(ALCdevice
*device
, const ALCchar
*extname
);
197 ALC_API
void* ALC_APIENTRY
alcGetProcAddress(ALCdevice
*device
, const ALCchar
*funcname
);
198 ALC_API ALCenum ALC_APIENTRY
alcGetEnumValue(ALCdevice
*device
, const ALCchar
*enumname
);
200 /** Query function. */
201 ALC_API
const ALCchar
* ALC_APIENTRY
alcGetString(ALCdevice
*device
, ALCenum param
);
202 ALC_API
void ALC_APIENTRY
alcGetIntegerv(ALCdevice
*device
, ALCenum param
, ALCsizei size
, ALCint
*values
);
204 /** Capture function. */
205 ALC_API ALCdevice
* ALC_APIENTRY
alcCaptureOpenDevice(const ALCchar
*devicename
, ALCuint frequency
, ALCenum format
, ALCsizei buffersize
);
206 ALC_API ALCboolean ALC_APIENTRY
alcCaptureCloseDevice(ALCdevice
*device
);
207 ALC_API
void ALC_APIENTRY
alcCaptureStart(ALCdevice
*device
);
208 ALC_API
void ALC_APIENTRY
alcCaptureStop(ALCdevice
*device
);
209 ALC_API
void ALC_APIENTRY
alcCaptureSamples(ALCdevice
*device
, ALCvoid
*buffer
, ALCsizei samples
);
211 /** Pointer-to-function type, useful for dynamically getting ALC entry points. */
212 typedef ALCcontext
* (ALC_APIENTRY
*LPALCCREATECONTEXT
)(ALCdevice
*device
, const ALCint
*attrlist
);
213 typedef ALCboolean (ALC_APIENTRY
*LPALCMAKECONTEXTCURRENT
)(ALCcontext
*context
);
214 typedef void (ALC_APIENTRY
*LPALCPROCESSCONTEXT
)(ALCcontext
*context
);
215 typedef void (ALC_APIENTRY
*LPALCSUSPENDCONTEXT
)(ALCcontext
*context
);
216 typedef void (ALC_APIENTRY
*LPALCDESTROYCONTEXT
)(ALCcontext
*context
);
217 typedef ALCcontext
* (ALC_APIENTRY
*LPALCGETCURRENTCONTEXT
)(void);
218 typedef ALCdevice
* (ALC_APIENTRY
*LPALCGETCONTEXTSDEVICE
)(ALCcontext
*context
);
219 typedef ALCdevice
* (ALC_APIENTRY
*LPALCOPENDEVICE
)(const ALCchar
*devicename
);
220 typedef ALCboolean (ALC_APIENTRY
*LPALCCLOSEDEVICE
)(ALCdevice
*device
);
221 typedef ALCenum (ALC_APIENTRY
*LPALCGETERROR
)(ALCdevice
*device
);
222 typedef ALCboolean (ALC_APIENTRY
*LPALCISEXTENSIONPRESENT
)(ALCdevice
*device
, const ALCchar
*extname
);
223 typedef void* (ALC_APIENTRY
*LPALCGETPROCADDRESS
)(ALCdevice
*device
, const ALCchar
*funcname
);
224 typedef ALCenum (ALC_APIENTRY
*LPALCGETENUMVALUE
)(ALCdevice
*device
, const ALCchar
*enumname
);
225 typedef const ALCchar
* (ALC_APIENTRY
*LPALCGETSTRING
)(ALCdevice
*device
, ALCenum param
);
226 typedef void (ALC_APIENTRY
*LPALCGETINTEGERV
)(ALCdevice
*device
, ALCenum param
, ALCsizei size
, ALCint
*values
);
227 typedef ALCdevice
* (ALC_APIENTRY
*LPALCCAPTUREOPENDEVICE
)(const ALCchar
*devicename
, ALCuint frequency
, ALCenum format
, ALCsizei buffersize
);
228 typedef ALCboolean (ALC_APIENTRY
*LPALCCAPTURECLOSEDEVICE
)(ALCdevice
*device
);
229 typedef void (ALC_APIENTRY
*LPALCCAPTURESTART
)(ALCdevice
*device
);
230 typedef void (ALC_APIENTRY
*LPALCCAPTURESTOP
)(ALCdevice
*device
);
231 typedef void (ALC_APIENTRY
*LPALCCAPTURESAMPLES
)(ALCdevice
*device
, ALCvoid
*buffer
, ALCsizei samples
);
233 #if defined(__cplusplus)
237 #endif /* AL_ALC_H */