Mercurial > audio-send
view include/AL/alc.h @ 9:a988ea53d982
added description of JNI stuff to README
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 27 Oct 2011 02:47:28 -0700 |
parents | f9476ff7637e |
children |
line wrap: on
line source
1 #ifndef AL_ALC_H2 #define AL_ALC_H4 #if defined(__cplusplus)5 extern "C" {6 #endif8 #ifndef ALC_API9 #if defined(AL_LIBTYPE_STATIC)10 #define ALC_API11 #elif defined(_WIN32)12 #define ALC_API __declspec(dllimport)13 #else14 #define ALC_API extern15 #endif16 #endif18 #if defined(_WIN32)19 #define ALC_APIENTRY __cdecl20 #else21 #define ALC_APIENTRY22 #endif24 #if defined(TARGET_OS_MAC) && TARGET_OS_MAC25 #pragma export on26 #endif28 /*29 * The ALCAPI, ALCAPIENTRY, and ALC_INVALID macros are deprecated, but are30 * included for applications porting code from AL 1.031 */32 #define ALCAPI ALC_API33 #define ALCAPIENTRY ALC_APIENTRY34 #define ALC_INVALID 037 #define ALC_VERSION_0_1 139 typedef struct ALCdevice_struct ALCdevice;40 typedef struct ALCcontext_struct ALCcontext;43 /** 8-bit boolean */44 typedef char ALCboolean;46 /** character */47 typedef char ALCchar;49 /** signed 8-bit 2's complement integer */50 typedef signed char ALCbyte;52 /** unsigned 8-bit integer */53 typedef unsigned char ALCubyte;55 /** signed 16-bit 2's complement integer */56 typedef short ALCshort;58 /** unsigned 16-bit integer */59 typedef unsigned short ALCushort;61 /** signed 32-bit 2's complement integer */62 typedef int ALCint;64 /** unsigned 32-bit integer */65 typedef unsigned int ALCuint;67 /** non-negative 32-bit binary integer size */68 typedef int ALCsizei;70 /** enumerated 32-bit value */71 typedef int ALCenum;73 /** 32-bit IEEE754 floating-point */74 typedef float ALCfloat;76 /** 64-bit IEEE754 floating-point */77 typedef double ALCdouble;79 /** void type (for opaque pointers only) */80 typedef void ALCvoid;83 /* Enumerant values begin at column 50. No tabs. */85 /* Boolean False. */86 #define ALC_FALSE 088 /* Boolean True. */89 #define ALC_TRUE 191 /**92 * followed by <int> Hz93 */94 #define ALC_FREQUENCY 0x100796 /**97 * followed by <int> Hz98 */99 #define ALC_REFRESH 0x1008101 /**102 * followed by AL_TRUE, AL_FALSE103 */104 #define ALC_SYNC 0x1009106 /**107 * followed by <int> Num of requested Mono (3D) Sources108 */109 #define ALC_MONO_SOURCES 0x1010111 /**112 * followed by <int> Num of requested Stereo Sources113 */114 #define ALC_STEREO_SOURCES 0x1011116 /**117 * errors118 */120 /**121 * No error122 */123 #define ALC_NO_ERROR ALC_FALSE125 /**126 * No device127 */128 #define ALC_INVALID_DEVICE 0xA001130 /**131 * invalid context ID132 */133 #define ALC_INVALID_CONTEXT 0xA002135 /**136 * bad enum137 */138 #define ALC_INVALID_ENUM 0xA003140 /**141 * bad value142 */143 #define ALC_INVALID_VALUE 0xA004145 /**146 * Out of memory.147 */148 #define ALC_OUT_OF_MEMORY 0xA005151 /**152 * The Specifier string for default device153 */154 #define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004155 #define ALC_DEVICE_SPECIFIER 0x1005156 #define ALC_EXTENSIONS 0x1006158 #define ALC_MAJOR_VERSION 0x1000159 #define ALC_MINOR_VERSION 0x1001161 #define ALC_ATTRIBUTES_SIZE 0x1002162 #define ALC_ALL_ATTRIBUTES 0x1003165 /**166 * Capture extension167 */168 #define ALC_EXT_CAPTURE 1169 #define ALC_CAPTURE_DEVICE_SPECIFIER 0x310170 #define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311171 #define ALC_CAPTURE_SAMPLES 0x312174 /**175 * ALC_ENUMERATE_ALL_EXT enums176 */177 #define ALC_ENUMERATE_ALL_EXT 1178 #define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012179 #define ALC_ALL_DEVICES_SPECIFIER 0x1013182 /*183 * Context Management184 */185 ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist );187 ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );189 ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context );191 ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context );193 ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context );195 ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void );197 ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );200 /*201 * Device Management202 */203 ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename );205 ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );208 /*209 * Error support.210 * Obtain the most recent Context error211 */212 ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );215 /*216 * Extension support.217 * Query for the presence of an extension, and obtain any appropriate218 * function pointers and enum values.219 */220 ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname );222 ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname );224 ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );227 /*228 * Query functions229 */230 ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );232 ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data );235 /*236 * Capture functions237 */238 ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );240 ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device );242 ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device );244 ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device );246 ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );248 /*249 * Pointer-to-function types, useful for dynamically getting ALC entry points.250 */251 typedef ALCcontext * (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);252 typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );253 typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );254 typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );255 typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );256 typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void );257 typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );258 typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );259 typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );260 typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device );261 typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname );262 typedef void * (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname );263 typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname );264 typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param );265 typedef void (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );266 typedef ALCdevice * (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );267 typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device );268 typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device );269 typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device );270 typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );272 #if defined(TARGET_OS_MAC) && TARGET_OS_MAC273 #pragma export off274 #endif276 #if defined(__cplusplus)277 }278 #endif280 #endif /* AL_ALC_H */