Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

290 lines
9.2 KiB

  1. #ifndef AL_ALC_H
  2. #define AL_ALC_H
  3. #if defined(__cplusplus)
  4. extern "C" {
  5. #endif
  6. #if defined(_WIN32) && !defined(_XBOX)
  7. /* _OPENAL32LIB is deprecated */
  8. #if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB)
  9. #define ALC_API __declspec(dllexport)
  10. #else
  11. #define ALC_API __declspec(dllimport)
  12. #endif
  13. #else
  14. #define ALC_API extern
  15. #endif
  16. #if defined(_WIN32)
  17. #define ALC_APIENTRY __cdecl
  18. #else
  19. #define ALC_APIENTRY
  20. #endif
  21. #if TARGET_OS_MAC
  22. #pragma export on
  23. #endif
  24. #define ALC_VERSION_0_1 1
  25. typedef struct ALCdevice_struct ALCdevice;
  26. typedef struct ALCcontext_struct ALCcontext;
  27. /** 8-bit boolean */
  28. typedef char ALCboolean;
  29. /** character */
  30. typedef char ALCchar;
  31. /** signed 8-bit 2's complement integer */
  32. typedef char ALCbyte;
  33. /** unsigned 8-bit integer */
  34. typedef unsigned char ALCubyte;
  35. /** signed 16-bit 2's complement integer */
  36. typedef short ALCshort;
  37. /** unsigned 16-bit integer */
  38. typedef unsigned short ALCushort;
  39. /** signed 32-bit 2's complement integer */
  40. typedef int ALCint;
  41. /** unsigned 32-bit integer */
  42. typedef unsigned int ALCuint;
  43. /** non-negative 32-bit binary integer size */
  44. typedef int ALCsizei;
  45. /** enumerated 32-bit value */
  46. typedef int ALCenum;
  47. /** 32-bit IEEE754 floating-point */
  48. typedef float ALCfloat;
  49. /** 64-bit IEEE754 floating-point */
  50. typedef double ALCdouble;
  51. /** void type (for opaque pointers only) */
  52. typedef void ALCvoid;
  53. /* Enumerant values begin at column 50. No tabs. */
  54. /* bad value */
  55. #define ALC_INVALID 0
  56. /* Boolean False. */
  57. #define ALC_FALSE 0
  58. /* Boolean True. */
  59. #define ALC_TRUE 1
  60. /**
  61. * followed by <int> Hz
  62. */
  63. #define ALC_FREQUENCY 0x1007
  64. /**
  65. * followed by <int> Hz
  66. */
  67. #define ALC_REFRESH 0x1008
  68. /**
  69. * followed by AL_TRUE, AL_FALSE
  70. */
  71. #define ALC_SYNC 0x1009
  72. /**
  73. * followed by <int> Num of requested Mono (3D) Sources
  74. */
  75. #define ALC_MONO_SOURCES 0x1010
  76. /**
  77. * followed by <int> Num of requested Stereo Sources
  78. */
  79. #define ALC_STEREO_SOURCES 0x1011
  80. /**
  81. * errors
  82. */
  83. /**
  84. * No error
  85. */
  86. #define ALC_NO_ERROR ALC_FALSE
  87. /**
  88. * No device
  89. */
  90. #define ALC_INVALID_DEVICE 0xA001
  91. /**
  92. * invalid context ID
  93. */
  94. #define ALC_INVALID_CONTEXT 0xA002
  95. /**
  96. * bad enum
  97. */
  98. #define ALC_INVALID_ENUM 0xA003
  99. /**
  100. * bad value
  101. */
  102. #define ALC_INVALID_VALUE 0xA004
  103. /**
  104. * Out of memory.
  105. */
  106. #define ALC_OUT_OF_MEMORY 0xA005
  107. /**
  108. * The Specifier string for default device
  109. */
  110. #define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
  111. #define ALC_DEVICE_SPECIFIER 0x1005
  112. #define ALC_EXTENSIONS 0x1006
  113. #define ALC_MAJOR_VERSION 0x1000
  114. #define ALC_MINOR_VERSION 0x1001
  115. #define ALC_ATTRIBUTES_SIZE 0x1002
  116. #define ALC_ALL_ATTRIBUTES 0x1003
  117. /**
  118. * Capture extension
  119. */
  120. #define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
  121. #define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311
  122. #define ALC_CAPTURE_SAMPLES 0x312
  123. #if !defined(ALC_NO_PROTOTYPES)
  124. /*
  125. * Context Management
  126. */
  127. ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist );
  128. ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );
  129. ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context );
  130. ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context );
  131. ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context );
  132. ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( );
  133. ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
  134. /*
  135. * Device Management
  136. */
  137. ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename );
  138. ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );
  139. /*
  140. * Error support.
  141. * Obtain the most recent Context error
  142. */
  143. ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );
  144. /*
  145. * Extension support.
  146. * Query for the presence of an extension, and obtain any appropriate
  147. * function pointers and enum values.
  148. */
  149. ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname );
  150. ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname );
  151. ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
  152. /*
  153. * Query functions
  154. */
  155. ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
  156. ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data );
  157. /*
  158. * Capture functions
  159. */
  160. ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
  161. ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device );
  162. ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device );
  163. ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device );
  164. ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
  165. #else /* ALC_NO_PROTOTYPES */
  166. ALC_API ALCcontext * (ALC_APIENTRY *alcCreateContext)( ALCdevice *device, const ALCint* attrlist );
  167. ALC_API ALCboolean (ALC_APIENTRY *alcMakeContextCurrent)( ALCcontext *context );
  168. ALC_API void (ALC_APIENTRY *alcProcessContext)( ALCcontext *context );
  169. ALC_API void (ALC_APIENTRY *alcSuspendContext)( ALCcontext *context );
  170. ALC_API void (ALC_APIENTRY *alcDestroyContext)( ALCcontext *context );
  171. ALC_API ALCcontext * (ALC_APIENTRY *alcGetCurrentContext)( ALCvoid );
  172. ALC_API ALCdevice * (ALC_APIENTRY *alcGetContextsDevice)( ALCcontext *context );
  173. ALC_API ALCdevice * (ALC_APIENTRY *alcOpenDevice)( const ALCchar *devicename );
  174. ALC_API ALCboolean (ALC_APIENTRY *alcCloseDevice)( ALCdevice *device );
  175. ALC_API ALCenum (ALC_APIENTRY *alcGetError)( ALCdevice *device );
  176. ALC_API ALCboolean (ALC_APIENTRY *alcIsExtensionPresent)( ALCdevice *device, const ALCchar *extname );
  177. ALC_API void * (ALC_APIENTRY *alcGetProcAddress)( ALCdevice *device, const ALCchar *funcname );
  178. ALC_API ALCenum (ALC_APIENTRY *alcGetEnumValue)( ALCdevice *device, const ALCchar *enumname );
  179. ALC_API const ALCchar* (ALC_APIENTRY *alcGetString)( ALCdevice *device, ALCenum param );
  180. ALC_API void (ALC_APIENTRY *alcGetIntegerv)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );
  181. ALC_API ALCdevice * (ALC_APIENTRY *alcCaptureOpenDevice)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
  182. ALC_API ALCboolean (ALC_APIENTRY *alcCaptureCloseDevice)( ALCdevice *device );
  183. ALC_API void (ALC_APIENTRY *alcCaptureStart)( ALCdevice *device );
  184. ALC_API void (ALC_APIENTRY *alcCaptureStop)( ALCdevice *device );
  185. ALC_API void (ALC_APIENTRY *alcCaptureSamples)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
  186. /* Type definitions */
  187. typedef ALCcontext * (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist);
  188. typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context );
  189. typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context );
  190. typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context );
  191. typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context );
  192. typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( ALCvoid );
  193. typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context );
  194. typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename );
  195. typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device );
  196. typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device );
  197. typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname );
  198. typedef void * (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname );
  199. typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname );
  200. typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param );
  201. typedef void (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );
  202. typedef ALCdevice * (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
  203. typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device );
  204. typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device );
  205. typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device );
  206. typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
  207. #endif /* ALC_NO_PROTOTYPES */
  208. #if TARGET_OS_MAC
  209. #pragma export off
  210. #endif
  211. #if defined(__cplusplus)
  212. }
  213. #endif
  214. #endif /* AL_ALC_H */