al.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. #ifndef AL_AL_H
  2. #define AL_AL_H
  3. #if defined(__cplusplus)
  4. extern "C" {
  5. #endif
  6. #if defined(AL_LIBTYPE_STATIC)
  7. #define AL_API
  8. #elif defined(_WIN32) && !defined(_XBOX)
  9. #if defined(AL_BUILD_LIBRARY)
  10. #define AL_API __declspec(dllexport)
  11. #else
  12. #define AL_API __declspec(dllimport)
  13. #endif
  14. #else
  15. #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
  16. #define AL_API __attribute__((visibility("protected")))
  17. #else
  18. #define AL_API extern
  19. #endif
  20. #endif
  21. #if defined(_WIN32)
  22. #define AL_APIENTRY __cdecl
  23. #else
  24. #define AL_APIENTRY
  25. #endif
  26. #if defined(TARGET_OS_MAC) && TARGET_OS_MAC
  27. #pragma export on
  28. #endif
  29. /*
  30. * The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and
  31. * AL_ILLEGAL_COMMAND macros are deprecated, but are included for
  32. * applications porting code from AL 1.0
  33. */
  34. #define OPENAL
  35. #define ALAPI AL_API
  36. #define ALAPIENTRY AL_APIENTRY
  37. #define AL_INVALID (-1)
  38. #define AL_ILLEGAL_ENUM AL_INVALID_ENUM
  39. #define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
  40. #define AL_VERSION_1_0
  41. #define AL_VERSION_1_1
  42. /** 8-bit boolean */
  43. typedef char ALboolean;
  44. /** character */
  45. typedef char ALchar;
  46. /** signed 8-bit 2's complement integer */
  47. typedef signed char ALbyte;
  48. /** unsigned 8-bit integer */
  49. typedef unsigned char ALubyte;
  50. /** signed 16-bit 2's complement integer */
  51. typedef short ALshort;
  52. /** unsigned 16-bit integer */
  53. typedef unsigned short ALushort;
  54. /** signed 32-bit 2's complement integer */
  55. typedef int ALint;
  56. /** unsigned 32-bit integer */
  57. typedef unsigned int ALuint;
  58. /** non-negative 32-bit binary integer size */
  59. typedef int ALsizei;
  60. /** enumerated 32-bit value */
  61. typedef int ALenum;
  62. /** 32-bit IEEE754 floating-point */
  63. typedef float ALfloat;
  64. /** 64-bit IEEE754 floating-point */
  65. typedef double ALdouble;
  66. /** void type (for opaque pointers only) */
  67. typedef void ALvoid;
  68. /* Enumerant values begin at column 50. No tabs. */
  69. /* "no distance model" or "no buffer" */
  70. #define AL_NONE 0
  71. /* Boolean False. */
  72. #define AL_FALSE 0
  73. /** Boolean True. */
  74. #define AL_TRUE 1
  75. /** Indicate Source has relative coordinates. */
  76. #define AL_SOURCE_RELATIVE 0x202
  77. /**
  78. * Directional source, inner cone angle, in degrees.
  79. * Range: [0-360]
  80. * Default: 360
  81. */
  82. #define AL_CONE_INNER_ANGLE 0x1001
  83. /**
  84. * Directional source, outer cone angle, in degrees.
  85. * Range: [0-360]
  86. * Default: 360
  87. */
  88. #define AL_CONE_OUTER_ANGLE 0x1002
  89. /**
  90. * Specify the pitch to be applied at source.
  91. * Range: [0.5-2.0]
  92. * Default: 1.0
  93. */
  94. #define AL_PITCH 0x1003
  95. /**
  96. * Specify the current location in three dimensional space.
  97. * OpenAL, like OpenGL, uses a right handed coordinate system,
  98. * where in a frontal default view X (thumb) points right,
  99. * Y points up (index finger), and Z points towards the
  100. * viewer/camera (middle finger).
  101. * To switch from a left handed coordinate system, flip the
  102. * sign on the Z coordinate.
  103. * Listener position is always in the world coordinate system.
  104. */
  105. #define AL_POSITION 0x1004
  106. /** Specify the current direction. */
  107. #define AL_DIRECTION 0x1005
  108. /** Specify the current velocity in three dimensional space. */
  109. #define AL_VELOCITY 0x1006
  110. /**
  111. * Indicate whether source is looping.
  112. * Type: ALboolean?
  113. * Range: [AL_TRUE, AL_FALSE]
  114. * Default: FALSE.
  115. */
  116. #define AL_LOOPING 0x1007
  117. /**
  118. * Indicate the buffer to provide sound samples.
  119. * Type: ALuint.
  120. * Range: any valid Buffer id.
  121. */
  122. #define AL_BUFFER 0x1009
  123. /**
  124. * Indicate the gain (volume amplification) applied.
  125. * Type: ALfloat.
  126. * Range: ]0.0- ]
  127. * A value of 1.0 means un-attenuated/unchanged.
  128. * Each division by 2 equals an attenuation of -6dB.
  129. * Each multiplicaton with 2 equals an amplification of +6dB.
  130. * A value of 0.0 is meaningless with respect to a logarithmic
  131. * scale; it is interpreted as zero volume - the channel
  132. * is effectively disabled.
  133. */
  134. #define AL_GAIN 0x100A
  135. /*
  136. * Indicate minimum source attenuation
  137. * Type: ALfloat
  138. * Range: [0.0 - 1.0]
  139. *
  140. * Logarthmic
  141. */
  142. #define AL_MIN_GAIN 0x100D
  143. /**
  144. * Indicate maximum source attenuation
  145. * Type: ALfloat
  146. * Range: [0.0 - 1.0]
  147. *
  148. * Logarthmic
  149. */
  150. #define AL_MAX_GAIN 0x100E
  151. /**
  152. * Indicate listener orientation.
  153. *
  154. * at/up
  155. */
  156. #define AL_ORIENTATION 0x100F
  157. /**
  158. * Source state information.
  159. */
  160. #define AL_SOURCE_STATE 0x1010
  161. #define AL_INITIAL 0x1011
  162. #define AL_PLAYING 0x1012
  163. #define AL_PAUSED 0x1013
  164. #define AL_STOPPED 0x1014
  165. /**
  166. * Buffer Queue params
  167. */
  168. #define AL_BUFFERS_QUEUED 0x1015
  169. #define AL_BUFFERS_PROCESSED 0x1016
  170. /**
  171. * Source buffer position information
  172. */
  173. #define AL_SEC_OFFSET 0x1024
  174. #define AL_SAMPLE_OFFSET 0x1025
  175. #define AL_BYTE_OFFSET 0x1026
  176. /*
  177. * Source type (Static, Streaming or undetermined)
  178. * Source is Static if a Buffer has been attached using AL_BUFFER
  179. * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
  180. * Source is undetermined when it has the NULL buffer attached
  181. */
  182. #define AL_SOURCE_TYPE 0x1027
  183. #define AL_STATIC 0x1028
  184. #define AL_STREAMING 0x1029
  185. #define AL_UNDETERMINED 0x1030
  186. /** Sound samples: format specifier. */
  187. #define AL_FORMAT_MONO8 0x1100
  188. #define AL_FORMAT_MONO16 0x1101
  189. #define AL_FORMAT_STEREO8 0x1102
  190. #define AL_FORMAT_STEREO16 0x1103
  191. /**
  192. * source specific reference distance
  193. * Type: ALfloat
  194. * Range: 0.0 - +inf
  195. *
  196. * At 0.0, no distance attenuation occurs. Default is
  197. * 1.0.
  198. */
  199. #define AL_REFERENCE_DISTANCE 0x1020
  200. /**
  201. * source specific rolloff factor
  202. * Type: ALfloat
  203. * Range: 0.0 - +inf
  204. *
  205. */
  206. #define AL_ROLLOFF_FACTOR 0x1021
  207. /**
  208. * Directional source, outer cone gain.
  209. *
  210. * Default: 0.0
  211. * Range: [0.0 - 1.0]
  212. * Logarithmic
  213. */
  214. #define AL_CONE_OUTER_GAIN 0x1022
  215. /**
  216. * Indicate distance above which sources are not
  217. * attenuated using the inverse clamped distance model.
  218. *
  219. * Default: +inf
  220. * Type: ALfloat
  221. * Range: 0.0 - +inf
  222. */
  223. #define AL_MAX_DISTANCE 0x1023
  224. /**
  225. * Sound samples: frequency, in units of Hertz [Hz].
  226. * This is the number of samples per second. Half of the
  227. * sample frequency marks the maximum significant
  228. * frequency component.
  229. */
  230. #define AL_FREQUENCY 0x2001
  231. #define AL_BITS 0x2002
  232. #define AL_CHANNELS 0x2003
  233. #define AL_SIZE 0x2004
  234. /**
  235. * Buffer state.
  236. *
  237. * Not supported for public use (yet).
  238. */
  239. #define AL_UNUSED 0x2010
  240. #define AL_PENDING 0x2011
  241. #define AL_PROCESSED 0x2012
  242. /** Errors: No Error. */
  243. #define AL_NO_ERROR AL_FALSE
  244. /**
  245. * Invalid Name paramater passed to AL call.
  246. */
  247. #define AL_INVALID_NAME 0xA001
  248. /**
  249. * Invalid parameter passed to AL call.
  250. */
  251. #define AL_INVALID_ENUM 0xA002
  252. /**
  253. * Invalid enum parameter value.
  254. */
  255. #define AL_INVALID_VALUE 0xA003
  256. /**
  257. * Illegal call.
  258. */
  259. #define AL_INVALID_OPERATION 0xA004
  260. /**
  261. * No mojo.
  262. */
  263. #define AL_OUT_OF_MEMORY 0xA005
  264. /** Context strings: Vendor Name. */
  265. #define AL_VENDOR 0xB001
  266. #define AL_VERSION 0xB002
  267. #define AL_RENDERER 0xB003
  268. #define AL_EXTENSIONS 0xB004
  269. /** Global tweakage. */
  270. /**
  271. * Doppler scale. Default 1.0
  272. */
  273. #define AL_DOPPLER_FACTOR 0xC000
  274. /**
  275. * Tweaks speed of propagation.
  276. */
  277. #define AL_DOPPLER_VELOCITY 0xC001
  278. /**
  279. * Speed of Sound in units per second
  280. */
  281. #define AL_SPEED_OF_SOUND 0xC003
  282. /**
  283. * Distance models
  284. *
  285. * used in conjunction with DistanceModel
  286. *
  287. * implicit: NONE, which disances distance attenuation.
  288. */
  289. #define AL_DISTANCE_MODEL 0xD000
  290. #define AL_INVERSE_DISTANCE 0xD001
  291. #define AL_INVERSE_DISTANCE_CLAMPED 0xD002
  292. #define AL_LINEAR_DISTANCE 0xD003
  293. #define AL_LINEAR_DISTANCE_CLAMPED 0xD004
  294. #define AL_EXPONENT_DISTANCE 0xD005
  295. #define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
  296. /**
  297. * Priority
  298. *
  299. * Apportable Extension.
  300. * Used to prevent dynamic throttling of this source
  301. *
  302. */
  303. #define AL_PRIORITY 0xE001
  304. #define AL_PRIORITY_SLOTS 0xE002
  305. /*
  306. * Renderer State management
  307. */
  308. AL_API void AL_APIENTRY alEnable( ALenum capability );
  309. AL_API void AL_APIENTRY alDisable( ALenum capability );
  310. AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability );
  311. /*
  312. * State retrieval
  313. */
  314. AL_API const ALchar* AL_APIENTRY alGetString( ALenum param );
  315. AL_API void AL_APIENTRY alGetBooleanv( ALenum param, ALboolean* data );
  316. AL_API void AL_APIENTRY alGetIntegerv( ALenum param, ALint* data );
  317. AL_API void AL_APIENTRY alGetFloatv( ALenum param, ALfloat* data );
  318. AL_API void AL_APIENTRY alGetDoublev( ALenum param, ALdouble* data );
  319. AL_API ALboolean AL_APIENTRY alGetBoolean( ALenum param );
  320. AL_API ALint AL_APIENTRY alGetInteger( ALenum param );
  321. AL_API ALfloat AL_APIENTRY alGetFloat( ALenum param );
  322. AL_API ALdouble AL_APIENTRY alGetDouble( ALenum param );
  323. /*
  324. * Error support.
  325. * Obtain the most recent error generated in the AL state machine.
  326. */
  327. AL_API ALenum AL_APIENTRY alGetError( void );
  328. /*
  329. * Extension support.
  330. * Query for the presence of an extension, and obtain any appropriate
  331. * function pointers and enum values.
  332. */
  333. AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname );
  334. AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname );
  335. AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
  336. /*
  337. * LISTENER
  338. * Listener represents the location and orientation of the
  339. * 'user' in 3D-space.
  340. *
  341. * Properties include: -
  342. *
  343. * Gain AL_GAIN ALfloat
  344. * Position AL_POSITION ALfloat[3]
  345. * Velocity AL_VELOCITY ALfloat[3]
  346. * Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors)
  347. */
  348. /*
  349. * Set Listener parameters
  350. */
  351. AL_API void AL_APIENTRY alListenerf( ALenum param, ALfloat value );
  352. AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
  353. AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values );
  354. AL_API void AL_APIENTRY alListeneri( ALenum param, ALint value );
  355. AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 );
  356. AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values );
  357. /*
  358. * Get Listener parameters
  359. */
  360. AL_API void AL_APIENTRY alGetListenerf( ALenum param, ALfloat* value );
  361. AL_API void AL_APIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
  362. AL_API void AL_APIENTRY alGetListenerfv( ALenum param, ALfloat* values );
  363. AL_API void AL_APIENTRY alGetListeneri( ALenum param, ALint* value );
  364. AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
  365. AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values );
  366. /**
  367. * SOURCE
  368. * Sources represent individual sound objects in 3D-space.
  369. * Sources take the PCM data provided in the specified Buffer,
  370. * apply Source-specific modifications, and then
  371. * submit them to be mixed according to spatial arrangement etc.
  372. *
  373. * Properties include: -
  374. *
  375. * Gain AL_GAIN ALfloat
  376. * Min Gain AL_MIN_GAIN ALfloat
  377. * Max Gain AL_MAX_GAIN ALfloat
  378. * Position AL_POSITION ALfloat[3]
  379. * Velocity AL_VELOCITY ALfloat[3]
  380. * Direction AL_DIRECTION ALfloat[3]
  381. * Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE)
  382. * Reference Distance AL_REFERENCE_DISTANCE ALfloat
  383. * Max Distance AL_MAX_DISTANCE ALfloat
  384. * RollOff Factor AL_ROLLOFF_FACTOR ALfloat
  385. * Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat
  386. * Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat
  387. * Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat
  388. * Pitch AL_PITCH ALfloat
  389. * Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE)
  390. * MS Offset AL_MSEC_OFFSET ALint or ALfloat
  391. * Byte Offset AL_BYTE_OFFSET ALint or ALfloat
  392. * Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat
  393. * Attached Buffer AL_BUFFER ALint
  394. * State (Query only) AL_SOURCE_STATE ALint
  395. * Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint
  396. * Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint
  397. */
  398. /* Create Source objects */
  399. AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources );
  400. /* Delete Source objects */
  401. AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources );
  402. /* Verify a handle is a valid Source */
  403. AL_API ALboolean AL_APIENTRY alIsSource( ALuint sid );
  404. /*
  405. * Set Source parameters
  406. */
  407. AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value );
  408. AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
  409. AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values );
  410. AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value );
  411. AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
  412. AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values );
  413. /*
  414. * Get Source parameters
  415. */
  416. AL_API void AL_APIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value );
  417. AL_API void AL_APIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
  418. AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values );
  419. AL_API void AL_APIENTRY alGetSourcei( ALuint sid, ALenum param, ALint* value );
  420. AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
  421. AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values );
  422. /*
  423. * Source vector based playback calls
  424. */
  425. /* Play, replay, or resume (if paused) a list of Sources */
  426. AL_API void AL_APIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids );
  427. /* Stop a list of Sources */
  428. AL_API void AL_APIENTRY alSourceStopv( ALsizei ns, const ALuint *sids );
  429. /* Rewind a list of Sources */
  430. AL_API void AL_APIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids );
  431. /* Pause a list of Sources */
  432. AL_API void AL_APIENTRY alSourcePausev( ALsizei ns, const ALuint *sids );
  433. /*
  434. * Source based playback calls
  435. */
  436. /* Play, replay, or resume a Source */
  437. AL_API void AL_APIENTRY alSourcePlay( ALuint sid );
  438. /* Stop a Source */
  439. AL_API void AL_APIENTRY alSourceStop( ALuint sid );
  440. /* Rewind a Source (set playback postiton to beginning) */
  441. AL_API void AL_APIENTRY alSourceRewind( ALuint sid );
  442. /* Pause a Source */
  443. AL_API void AL_APIENTRY alSourcePause( ALuint sid );
  444. /*
  445. * Source Queuing
  446. */
  447. AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids );
  448. AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids );
  449. /**
  450. * BUFFER
  451. * Buffer objects are storage space for sample data.
  452. * Buffers are referred to by Sources. One Buffer can be used
  453. * by multiple Sources.
  454. *
  455. * Properties include: -
  456. *
  457. * Frequency (Query only) AL_FREQUENCY ALint
  458. * Size (Query only) AL_SIZE ALint
  459. * Bits (Query only) AL_BITS ALint
  460. * Channels (Query only) AL_CHANNELS ALint
  461. */
  462. /* Create Buffer objects */
  463. AL_API void AL_APIENTRY alGenBuffers( ALsizei n, ALuint* buffers );
  464. /* Delete Buffer objects */
  465. AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers );
  466. /* Verify a handle is a valid Buffer */
  467. AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid );
  468. /* Specify the data to be copied into a buffer */
  469. AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
  470. /*
  471. * Set Buffer parameters
  472. */
  473. AL_API void AL_APIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value );
  474. AL_API void AL_APIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
  475. AL_API void AL_APIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values );
  476. AL_API void AL_APIENTRY alBufferi( ALuint bid, ALenum param, ALint value );
  477. AL_API void AL_APIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
  478. AL_API void AL_APIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values );
  479. /*
  480. * Get Buffer parameters
  481. */
  482. AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value );
  483. AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
  484. AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values );
  485. AL_API void AL_APIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value );
  486. AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
  487. AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values );
  488. /*
  489. * Global Parameters
  490. */
  491. AL_API void AL_APIENTRY alDopplerFactor( ALfloat value );
  492. AL_API void AL_APIENTRY alDopplerVelocity( ALfloat value );
  493. AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value );
  494. AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
  495. /*
  496. * Pointer-to-function types, useful for dynamically getting AL entry points.
  497. */
  498. typedef void (AL_APIENTRY *LPALENABLE)( ALenum capability );
  499. typedef void (AL_APIENTRY *LPALDISABLE)( ALenum capability );
  500. typedef ALboolean (AL_APIENTRY *LPALISENABLED)( ALenum capability );
  501. typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)( ALenum param );
  502. typedef void (AL_APIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data );
  503. typedef void (AL_APIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data );
  504. typedef void (AL_APIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data );
  505. typedef void (AL_APIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data );
  506. typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)( ALenum param );
  507. typedef ALint (AL_APIENTRY *LPALGETINTEGER)( ALenum param );
  508. typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)( ALenum param );
  509. typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)( ALenum param );
  510. typedef ALenum (AL_APIENTRY *LPALGETERROR)( void );
  511. typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname );
  512. typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)( const ALchar* fname );
  513. typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)( const ALchar* ename );
  514. typedef void (AL_APIENTRY *LPALLISTENERF)( ALenum param, ALfloat value );
  515. typedef void (AL_APIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
  516. typedef void (AL_APIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values );
  517. typedef void (AL_APIENTRY *LPALLISTENERI)( ALenum param, ALint value );
  518. typedef void (AL_APIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 );
  519. typedef void (AL_APIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values );
  520. typedef void (AL_APIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value );
  521. typedef void (AL_APIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 );
  522. typedef void (AL_APIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values );
  523. typedef void (AL_APIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value );
  524. typedef void (AL_APIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
  525. typedef void (AL_APIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values );
  526. typedef void (AL_APIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources );
  527. typedef void (AL_APIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources );
  528. typedef ALboolean (AL_APIENTRY *LPALISSOURCE)( ALuint sid );
  529. typedef void (AL_APIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value);
  530. typedef void (AL_APIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
  531. typedef void (AL_APIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values );
  532. typedef void (AL_APIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value);
  533. typedef void (AL_APIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
  534. typedef void (AL_APIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values );
  535. typedef void (AL_APIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value );
  536. typedef void (AL_APIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
  537. typedef void (AL_APIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values );
  538. typedef void (AL_APIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value );
  539. typedef void (AL_APIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
  540. typedef void (AL_APIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values );
  541. typedef void (AL_APIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids );
  542. typedef void (AL_APIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids );
  543. typedef void (AL_APIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids );
  544. typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids );
  545. typedef void (AL_APIENTRY *LPALSOURCEPLAY)( ALuint sid );
  546. typedef void (AL_APIENTRY *LPALSOURCESTOP)( ALuint sid );
  547. typedef void (AL_APIENTRY *LPALSOURCEREWIND)( ALuint sid );
  548. typedef void (AL_APIENTRY *LPALSOURCEPAUSE)( ALuint sid );
  549. typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids );
  550. typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids );
  551. typedef void (AL_APIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers );
  552. typedef void (AL_APIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers );
  553. typedef ALboolean (AL_APIENTRY *LPALISBUFFER)( ALuint bid );
  554. typedef void (AL_APIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq );
  555. typedef void (AL_APIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value);
  556. typedef void (AL_APIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 );
  557. typedef void (AL_APIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values );
  558. typedef void (AL_APIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value);
  559. typedef void (AL_APIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 );
  560. typedef void (AL_APIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values );
  561. typedef void (AL_APIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value );
  562. typedef void (AL_APIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
  563. typedef void (AL_APIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values );
  564. typedef void (AL_APIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value );
  565. typedef void (AL_APIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
  566. typedef void (AL_APIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values );
  567. typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)( ALfloat value );
  568. typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value );
  569. typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value );
  570. typedef void (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel );
  571. #if defined(TARGET_OS_MAC) && TARGET_OS_MAC
  572. #pragma export off
  573. #endif
  574. #if defined(__cplusplus)
  575. } /* extern "C" */
  576. #endif
  577. #endif /* AL_AL_H */