al.h 25 KB

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