al.h 26 KB

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