al.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. #ifndef AL_AL_H
  2. #define AL_AL_H
  3. /* NOLINTBEGIN */
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #ifndef AL_DISABLE_NOEXCEPT
  7. #define AL_API_NOEXCEPT noexcept
  8. #if __cplusplus >= 201703L
  9. #define AL_API_NOEXCEPT17 noexcept
  10. #else
  11. #define AL_API_NOEXCEPT17
  12. #endif
  13. #else /* AL_DISABLE_NOEXCEPT */
  14. #define AL_API_NOEXCEPT
  15. #define AL_API_NOEXCEPT17
  16. #endif
  17. #else /* __cplusplus */
  18. #define AL_API_NOEXCEPT
  19. #define AL_API_NOEXCEPT17
  20. #endif
  21. #ifndef AL_API
  22. #if defined(AL_LIBTYPE_STATIC)
  23. #define AL_API
  24. #elif defined(_WIN32)
  25. #define AL_API __declspec(dllimport)
  26. #else
  27. #define AL_API extern
  28. #endif
  29. #endif
  30. #ifdef _WIN32
  31. #define AL_APIENTRY __cdecl
  32. #else
  33. #define AL_APIENTRY
  34. #endif
  35. /* Deprecated macros. */
  36. #define OPENAL
  37. #define ALAPI AL_API
  38. #define ALAPIENTRY AL_APIENTRY
  39. #define AL_INVALID (-1)
  40. #define AL_ILLEGAL_ENUM AL_INVALID_ENUM
  41. #define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
  42. /* Supported AL versions. */
  43. #define AL_VERSION_1_0
  44. #define AL_VERSION_1_1
  45. /** 8-bit boolean */
  46. typedef char ALboolean;
  47. /** character */
  48. typedef char ALchar;
  49. /** signed 8-bit integer */
  50. typedef signed char ALbyte;
  51. /** unsigned 8-bit integer */
  52. typedef unsigned char ALubyte;
  53. /** signed 16-bit integer */
  54. typedef short ALshort;
  55. /** unsigned 16-bit integer */
  56. typedef unsigned short ALushort;
  57. /** signed 32-bit integer */
  58. typedef int ALint;
  59. /** unsigned 32-bit integer */
  60. typedef unsigned int ALuint;
  61. /** non-negative 32-bit integer size */
  62. typedef int ALsizei;
  63. /** 32-bit enumeration value */
  64. typedef int ALenum;
  65. /** 32-bit IEEE-754 floating-point */
  66. typedef float ALfloat;
  67. /** 64-bit IEEE-754 floating-point */
  68. typedef double ALdouble;
  69. /** void type (opaque pointers only) */
  70. typedef void ALvoid;
  71. /* Enumeration values begin at column 50. Do not use tabs. */
  72. /** No distance model or no buffer */
  73. #define AL_NONE 0
  74. /** Boolean False. */
  75. #define AL_FALSE 0
  76. /** Boolean True. */
  77. #define AL_TRUE 1
  78. /**
  79. * Relative source.
  80. * Type: ALboolean
  81. * Range: [AL_FALSE, AL_TRUE]
  82. * Default: AL_FALSE
  83. *
  84. * Specifies if the source uses relative coordinates.
  85. */
  86. #define AL_SOURCE_RELATIVE 0x202
  87. /**
  88. * Inner cone angle, in degrees.
  89. * Type: ALint, ALfloat
  90. * Range: [0 - 360]
  91. * Default: 360
  92. *
  93. * The angle covered by the inner cone, the area within which the source will
  94. * not be attenuated by direction.
  95. */
  96. #define AL_CONE_INNER_ANGLE 0x1001
  97. /**
  98. * Outer cone angle, in degrees.
  99. * Range: [0 - 360]
  100. * Default: 360
  101. *
  102. * The angle covered by the outer cone, the area outside of which the source
  103. * will be fully attenuated by direction.
  104. */
  105. #define AL_CONE_OUTER_ANGLE 0x1002
  106. /**
  107. * Source pitch.
  108. * Type: ALfloat
  109. * Range: [0.5 - 2.0]
  110. * Default: 1.0
  111. *
  112. * A multiplier for the sample rate of the source's buffer.
  113. */
  114. #define AL_PITCH 0x1003
  115. /**
  116. * Source or listener position.
  117. * Type: ALfloat[3], ALint[3]
  118. * Default: {0, 0, 0}
  119. *
  120. * The source or listener location in three dimensional space.
  121. *
  122. * OpenAL uses a right handed coordinate system, like OpenGL, where with a
  123. * default view, X points right (thumb), Y points up (index finger), and Z
  124. * points towards the viewer/camera (middle finger).
  125. *
  126. * To change from or to a left handed coordinate system, negate the Z
  127. * component.
  128. */
  129. #define AL_POSITION 0x1004
  130. /**
  131. * Source direction.
  132. * Type: ALfloat[3], ALint[3]
  133. * Default: {0, 0, 0}
  134. *
  135. * Specifies the current direction in local space. A zero-length vector
  136. * specifies an omni-directional source (cone is ignored).
  137. *
  138. * To change from or to a left handed coordinate system, negate the Z
  139. * component.
  140. */
  141. #define AL_DIRECTION 0x1005
  142. /**
  143. * Source or listener velocity.
  144. * Type: ALfloat[3], ALint[3]
  145. * Default: {0, 0, 0}
  146. *
  147. * Specifies the current velocity, relative to the position.
  148. *
  149. * To change from or to a left handed coordinate system, negate the Z
  150. * component.
  151. */
  152. #define AL_VELOCITY 0x1006
  153. /**
  154. * Source looping.
  155. * Type: ALboolean
  156. * Range: [AL_FALSE, AL_TRUE]
  157. * Default: AL_FALSE
  158. *
  159. * Specifies whether source playback loops.
  160. */
  161. #define AL_LOOPING 0x1007
  162. /**
  163. * Source buffer.
  164. * Type: ALuint
  165. * Range: any valid Buffer ID
  166. * Default: AL_NONE
  167. *
  168. * Specifies the buffer to provide sound samples for a source.
  169. */
  170. #define AL_BUFFER 0x1009
  171. /**
  172. * Source or listener gain.
  173. * Type: ALfloat
  174. * Range: [0.0 - ]
  175. *
  176. * For sources, an initial linear gain value (before attenuation is applied).
  177. * For the listener, an output linear gain adjustment.
  178. *
  179. * A value of 1.0 means unattenuated. Each division by 2 equals an attenuation
  180. * of about -6dB. Each multiplication by 2 equals an amplification of about
  181. * +6dB.
  182. */
  183. #define AL_GAIN 0x100A
  184. /**
  185. * Minimum source gain.
  186. * Type: ALfloat
  187. * Range: [0.0 - 1.0]
  188. *
  189. * The minimum gain allowed for a source, after distance and cone attenuation
  190. * are applied (if applicable).
  191. */
  192. #define AL_MIN_GAIN 0x100D
  193. /**
  194. * Maximum source gain.
  195. * Type: ALfloat
  196. * Range: [0.0 - 1.0]
  197. *
  198. * The maximum gain allowed for a source, after distance and cone attenuation
  199. * are applied (if applicable).
  200. */
  201. #define AL_MAX_GAIN 0x100E
  202. /**
  203. * Listener orientation.
  204. * Type: ALfloat[6]
  205. * Default: {0.0, 0.0, -1.0, 0.0, 1.0, 0.0}
  206. *
  207. * Effectively two three dimensional vectors. The first vector is the front (or
  208. * "at") and the second is the top (or "up"). Both vectors are relative to the
  209. * listener position.
  210. *
  211. * To change from or to a left handed coordinate system, negate the Z
  212. * component of both vectors.
  213. */
  214. #define AL_ORIENTATION 0x100F
  215. /**
  216. * Source state (query only).
  217. * Type: ALenum
  218. * Range: [AL_INITIAL, AL_PLAYING, AL_PAUSED, AL_STOPPED]
  219. */
  220. #define AL_SOURCE_STATE 0x1010
  221. /* Source state values. */
  222. #define AL_INITIAL 0x1011
  223. #define AL_PLAYING 0x1012
  224. #define AL_PAUSED 0x1013
  225. #define AL_STOPPED 0x1014
  226. /**
  227. * Source Buffer Queue size (query only).
  228. * Type: ALint
  229. *
  230. * The number of buffers queued using alSourceQueueBuffers, minus the buffers
  231. * removed with alSourceUnqueueBuffers.
  232. */
  233. #define AL_BUFFERS_QUEUED 0x1015
  234. /**
  235. * Source Buffer Queue processed count (query only).
  236. * Type: ALint
  237. *
  238. * The number of queued buffers that have been fully processed, and can be
  239. * removed with alSourceUnqueueBuffers.
  240. *
  241. * Looping sources will never fully process buffers because they will be set to
  242. * play again for when the source loops.
  243. */
  244. #define AL_BUFFERS_PROCESSED 0x1016
  245. /**
  246. * Source reference distance.
  247. * Type: ALfloat
  248. * Range: [0.0 - ]
  249. * Default: 1.0
  250. *
  251. * The distance in units that no distance attenuation occurs.
  252. *
  253. * At 0.0, no distance attenuation occurs with non-linear attenuation models.
  254. */
  255. #define AL_REFERENCE_DISTANCE 0x1020
  256. /**
  257. * Source rolloff factor.
  258. * Type: ALfloat
  259. * Range: [0.0 - ]
  260. * Default: 1.0
  261. *
  262. * Multiplier to exaggerate or diminish distance attenuation.
  263. *
  264. * At 0.0, no distance attenuation ever occurs.
  265. */
  266. #define AL_ROLLOFF_FACTOR 0x1021
  267. /**
  268. * Outer cone gain.
  269. * Type: ALfloat
  270. * Range: [0.0 - 1.0]
  271. * Default: 0.0
  272. *
  273. * The gain attenuation applied when the listener is outside of the source's
  274. * outer cone angle.
  275. */
  276. #define AL_CONE_OUTER_GAIN 0x1022
  277. /**
  278. * Source maximum distance.
  279. * Type: ALfloat
  280. * Range: [0.0 - ]
  281. * Default: FLT_MAX
  282. *
  283. * The distance above which the source is not attenuated any further with a
  284. * clamped distance model, or where attenuation reaches 0.0 gain for linear
  285. * distance models with a default rolloff factor.
  286. */
  287. #define AL_MAX_DISTANCE 0x1023
  288. /** Source buffer offset, in seconds */
  289. #define AL_SEC_OFFSET 0x1024
  290. /** Source buffer offset, in sample frames */
  291. #define AL_SAMPLE_OFFSET 0x1025
  292. /** Source buffer offset, in bytes */
  293. #define AL_BYTE_OFFSET 0x1026
  294. /**
  295. * Source type (query only).
  296. * Type: ALenum
  297. * Range: [AL_STATIC, AL_STREAMING, AL_UNDETERMINED]
  298. *
  299. * A Source is Static if a Buffer has been attached using AL_BUFFER.
  300. *
  301. * A Source is Streaming if one or more Buffers have been attached using
  302. * alSourceQueueBuffers.
  303. *
  304. * A Source is Undetermined when it has the NULL buffer attached using
  305. * AL_BUFFER.
  306. */
  307. #define AL_SOURCE_TYPE 0x1027
  308. /* Source type values. */
  309. #define AL_STATIC 0x1028
  310. #define AL_STREAMING 0x1029
  311. #define AL_UNDETERMINED 0x1030
  312. /** Unsigned 8-bit mono buffer format. */
  313. #define AL_FORMAT_MONO8 0x1100
  314. /** Signed 16-bit mono buffer format. */
  315. #define AL_FORMAT_MONO16 0x1101
  316. /** Unsigned 8-bit stereo buffer format. */
  317. #define AL_FORMAT_STEREO8 0x1102
  318. /** Signed 16-bit stereo buffer format. */
  319. #define AL_FORMAT_STEREO16 0x1103
  320. /** Buffer frequency/sample rate (query only). */
  321. #define AL_FREQUENCY 0x2001
  322. /** Buffer bits per sample (query only). */
  323. #define AL_BITS 0x2002
  324. /** Buffer channel count (query only). */
  325. #define AL_CHANNELS 0x2003
  326. /** Buffer data size in bytes (query only). */
  327. #define AL_SIZE 0x2004
  328. /* Buffer state. Not for public use. */
  329. #define AL_UNUSED 0x2010
  330. #define AL_PENDING 0x2011
  331. #define AL_PROCESSED 0x2012
  332. /** No error. */
  333. #define AL_NO_ERROR 0
  334. /** Invalid name (ID) passed to an AL call. */
  335. #define AL_INVALID_NAME 0xA001
  336. /** Invalid enumeration passed to AL call. */
  337. #define AL_INVALID_ENUM 0xA002
  338. /** Invalid value passed to AL call. */
  339. #define AL_INVALID_VALUE 0xA003
  340. /** Illegal AL call. */
  341. #define AL_INVALID_OPERATION 0xA004
  342. /** Not enough memory to execute the AL call. */
  343. #define AL_OUT_OF_MEMORY 0xA005
  344. /** Context string: Vendor name. */
  345. #define AL_VENDOR 0xB001
  346. /** Context string: Version. */
  347. #define AL_VERSION 0xB002
  348. /** Context string: Renderer name. */
  349. #define AL_RENDERER 0xB003
  350. /** Context string: Space-separated extension list. */
  351. #define AL_EXTENSIONS 0xB004
  352. /**
  353. * Doppler scale.
  354. * Type: ALfloat
  355. * Range: [0.0 - ]
  356. * Default: 1.0
  357. *
  358. * Scale for source and listener velocities.
  359. */
  360. #define AL_DOPPLER_FACTOR 0xC000
  361. /**
  362. * Doppler velocity (deprecated).
  363. *
  364. * A multiplier applied to the Speed of Sound.
  365. */
  366. #define AL_DOPPLER_VELOCITY 0xC001
  367. /**
  368. * Speed of Sound, in units per second.
  369. * Type: ALfloat
  370. * Range: [0.0001 - ]
  371. * Default: 343.3
  372. *
  373. * The speed at which sound waves are assumed to travel, when calculating the
  374. * doppler effect from source and listener velocities.
  375. */
  376. #define AL_SPEED_OF_SOUND 0xC003
  377. /**
  378. * Distance attenuation model.
  379. * Type: ALenum
  380. * Range: [AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED,
  381. * AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED,
  382. * AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED]
  383. * Default: AL_INVERSE_DISTANCE_CLAMPED
  384. *
  385. * The model by which sources attenuate with distance.
  386. *
  387. * None - No distance attenuation.
  388. * Inverse - Doubling the distance halves the source gain.
  389. * Linear - Linear gain scaling between the reference and max distances.
  390. * Exponent - Exponential gain dropoff.
  391. *
  392. * Clamped variations work like the non-clamped counterparts, except the
  393. * distance calculated is clamped between the reference and max distances.
  394. */
  395. #define AL_DISTANCE_MODEL 0xD000
  396. /* Distance model values. */
  397. #define AL_INVERSE_DISTANCE 0xD001
  398. #define AL_INVERSE_DISTANCE_CLAMPED 0xD002
  399. #define AL_LINEAR_DISTANCE 0xD003
  400. #define AL_LINEAR_DISTANCE_CLAMPED 0xD004
  401. #define AL_EXPONENT_DISTANCE 0xD005
  402. #define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
  403. #ifndef AL_NO_PROTOTYPES
  404. /* Renderer State management. */
  405. AL_API void AL_APIENTRY alEnable(ALenum capability) AL_API_NOEXCEPT;
  406. AL_API void AL_APIENTRY alDisable(ALenum capability) AL_API_NOEXCEPT;
  407. AL_API ALboolean AL_APIENTRY alIsEnabled(ALenum capability) AL_API_NOEXCEPT;
  408. /* Context state setting. */
  409. AL_API void AL_APIENTRY alDopplerFactor(ALfloat value) AL_API_NOEXCEPT;
  410. AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value) AL_API_NOEXCEPT;
  411. AL_API void AL_APIENTRY alSpeedOfSound(ALfloat value) AL_API_NOEXCEPT;
  412. AL_API void AL_APIENTRY alDistanceModel(ALenum distanceModel) AL_API_NOEXCEPT;
  413. /* Context state retrieval. */
  414. AL_API const ALchar* AL_APIENTRY alGetString(ALenum param) AL_API_NOEXCEPT;
  415. AL_API void AL_APIENTRY alGetBooleanv(ALenum param, ALboolean *values) AL_API_NOEXCEPT;
  416. AL_API void AL_APIENTRY alGetIntegerv(ALenum param, ALint *values) AL_API_NOEXCEPT;
  417. AL_API void AL_APIENTRY alGetFloatv(ALenum param, ALfloat *values) AL_API_NOEXCEPT;
  418. AL_API void AL_APIENTRY alGetDoublev(ALenum param, ALdouble *values) AL_API_NOEXCEPT;
  419. AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum param) AL_API_NOEXCEPT;
  420. AL_API ALint AL_APIENTRY alGetInteger(ALenum param) AL_API_NOEXCEPT;
  421. AL_API ALfloat AL_APIENTRY alGetFloat(ALenum param) AL_API_NOEXCEPT;
  422. AL_API ALdouble AL_APIENTRY alGetDouble(ALenum param) AL_API_NOEXCEPT;
  423. /**
  424. * Obtain the first error generated in the AL context since the last call to
  425. * this function.
  426. */
  427. AL_API ALenum AL_APIENTRY alGetError(void) AL_API_NOEXCEPT;
  428. /** Query for the presence of an extension on the AL context. */
  429. AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname) AL_API_NOEXCEPT;
  430. /**
  431. * Retrieve the address of a function. The returned function may be context-
  432. * specific.
  433. */
  434. AL_API void* AL_APIENTRY alGetProcAddress(const ALchar *fname) AL_API_NOEXCEPT;
  435. /**
  436. * Retrieve the value of an enum. The returned value may be context-specific.
  437. */
  438. AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename) AL_API_NOEXCEPT;
  439. /* Set listener parameters. */
  440. AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value) AL_API_NOEXCEPT;
  441. AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT;
  442. AL_API void AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values) AL_API_NOEXCEPT;
  443. AL_API void AL_APIENTRY alListeneri(ALenum param, ALint value) AL_API_NOEXCEPT;
  444. AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT;
  445. AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values) AL_API_NOEXCEPT;
  446. /* Get listener parameters. */
  447. AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value) AL_API_NOEXCEPT;
  448. AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT;
  449. AL_API void AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values) AL_API_NOEXCEPT;
  450. AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value) AL_API_NOEXCEPT;
  451. AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT;
  452. AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint *values) AL_API_NOEXCEPT;
  453. /** Create source objects. */
  454. AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources) AL_API_NOEXCEPT;
  455. /** Delete source objects. */
  456. AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
  457. /** Verify an ID is for a valid source. */
  458. AL_API ALboolean AL_APIENTRY alIsSource(ALuint source) AL_API_NOEXCEPT;
  459. /* Set source parameters. */
  460. AL_API void AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value) AL_API_NOEXCEPT;
  461. AL_API void AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT;
  462. AL_API void AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat *values) AL_API_NOEXCEPT;
  463. AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value) AL_API_NOEXCEPT;
  464. AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT;
  465. AL_API void AL_APIENTRY alSourceiv(ALuint source, ALenum param, const ALint *values) AL_API_NOEXCEPT;
  466. /* Get source parameters. */
  467. AL_API void AL_APIENTRY alGetSourcef(ALuint source, ALenum param, ALfloat *value) AL_API_NOEXCEPT;
  468. AL_API void AL_APIENTRY alGetSource3f(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT;
  469. AL_API void AL_APIENTRY alGetSourcefv(ALuint source, ALenum param, ALfloat *values) AL_API_NOEXCEPT;
  470. AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value) AL_API_NOEXCEPT;
  471. AL_API void AL_APIENTRY alGetSource3i(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT;
  472. AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum param, ALint *values) AL_API_NOEXCEPT;
  473. /** Play, restart, or resume a source, setting its state to AL_PLAYING. */
  474. AL_API void AL_APIENTRY alSourcePlay(ALuint source) AL_API_NOEXCEPT;
  475. /** Stop a source, setting its state to AL_STOPPED if playing or paused. */
  476. AL_API void AL_APIENTRY alSourceStop(ALuint source) AL_API_NOEXCEPT;
  477. /** Rewind a source, setting its state to AL_INITIAL. */
  478. AL_API void AL_APIENTRY alSourceRewind(ALuint source) AL_API_NOEXCEPT;
  479. /** Pause a source, setting its state to AL_PAUSED if playing. */
  480. AL_API void AL_APIENTRY alSourcePause(ALuint source) AL_API_NOEXCEPT;
  481. /** Play, restart, or resume a list of sources atomically. */
  482. AL_API void AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
  483. /** Stop a list of sources atomically. */
  484. AL_API void AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
  485. /** Rewind a list of sources atomically. */
  486. AL_API void AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
  487. /** Pause a list of sources atomically. */
  488. AL_API void AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
  489. /** Queue buffers onto a source */
  490. AL_API void AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei nb, const ALuint *buffers) AL_API_NOEXCEPT;
  491. /** Unqueue processed buffers from a source */
  492. AL_API void AL_APIENTRY alSourceUnqueueBuffers(ALuint source, ALsizei nb, ALuint *buffers) AL_API_NOEXCEPT;
  493. /** Create buffer objects */
  494. AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers) AL_API_NOEXCEPT;
  495. /** Delete buffer objects */
  496. AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers) AL_API_NOEXCEPT;
  497. /** Verify an ID is a valid buffer (including the NULL buffer) */
  498. AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer) AL_API_NOEXCEPT;
  499. /**
  500. * Copies data into the buffer, interpreting it using the specified format and
  501. * samplerate.
  502. */
  503. AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei samplerate) AL_API_NOEXCEPT;
  504. /* Set buffer parameters. */
  505. AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat value) AL_API_NOEXCEPT;
  506. AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT;
  507. AL_API void AL_APIENTRY alBufferfv(ALuint buffer, ALenum param, const ALfloat *values) AL_API_NOEXCEPT;
  508. AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value) AL_API_NOEXCEPT;
  509. AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT;
  510. AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *values) AL_API_NOEXCEPT;
  511. /* Get buffer parameters. */
  512. AL_API void AL_APIENTRY alGetBufferf(ALuint buffer, ALenum param, ALfloat *value) AL_API_NOEXCEPT;
  513. AL_API void AL_APIENTRY alGetBuffer3f(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT;
  514. AL_API void AL_APIENTRY alGetBufferfv(ALuint buffer, ALenum param, ALfloat *values) AL_API_NOEXCEPT;
  515. AL_API void AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value) AL_API_NOEXCEPT;
  516. AL_API void AL_APIENTRY alGetBuffer3i(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT;
  517. AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum param, ALint *values) AL_API_NOEXCEPT;
  518. #endif /* AL_NO_PROTOTYPES */
  519. /* Pointer-to-function types, useful for storing dynamically loaded AL entry
  520. * points.
  521. */
  522. typedef void (AL_APIENTRY *LPALENABLE)(ALenum capability) AL_API_NOEXCEPT17;
  523. typedef void (AL_APIENTRY *LPALDISABLE)(ALenum capability) AL_API_NOEXCEPT17;
  524. typedef ALboolean (AL_APIENTRY *LPALISENABLED)(ALenum capability) AL_API_NOEXCEPT17;
  525. typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)(ALenum param) AL_API_NOEXCEPT17;
  526. typedef void (AL_APIENTRY *LPALGETBOOLEANV)(ALenum param, ALboolean *values) AL_API_NOEXCEPT17;
  527. typedef void (AL_APIENTRY *LPALGETINTEGERV)(ALenum param, ALint *values) AL_API_NOEXCEPT17;
  528. typedef void (AL_APIENTRY *LPALGETFLOATV)(ALenum param, ALfloat *values) AL_API_NOEXCEPT17;
  529. typedef void (AL_APIENTRY *LPALGETDOUBLEV)(ALenum param, ALdouble *values) AL_API_NOEXCEPT17;
  530. typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)(ALenum param) AL_API_NOEXCEPT17;
  531. typedef ALint (AL_APIENTRY *LPALGETINTEGER)(ALenum param) AL_API_NOEXCEPT17;
  532. typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)(ALenum param) AL_API_NOEXCEPT17;
  533. typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)(ALenum param) AL_API_NOEXCEPT17;
  534. typedef ALenum (AL_APIENTRY *LPALGETERROR)(void) AL_API_NOEXCEPT17;
  535. typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar *extname) AL_API_NOEXCEPT17;
  536. typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)(const ALchar *fname) AL_API_NOEXCEPT17;
  537. typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)(const ALchar *ename) AL_API_NOEXCEPT17;
  538. typedef void (AL_APIENTRY *LPALLISTENERF)(ALenum param, ALfloat value) AL_API_NOEXCEPT17;
  539. typedef void (AL_APIENTRY *LPALLISTENER3F)(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT17;
  540. typedef void (AL_APIENTRY *LPALLISTENERFV)(ALenum param, const ALfloat *values) AL_API_NOEXCEPT17;
  541. typedef void (AL_APIENTRY *LPALLISTENERI)(ALenum param, ALint value) AL_API_NOEXCEPT17;
  542. typedef void (AL_APIENTRY *LPALLISTENER3I)(ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT17;
  543. typedef void (AL_APIENTRY *LPALLISTENERIV)(ALenum param, const ALint *values) AL_API_NOEXCEPT17;
  544. typedef void (AL_APIENTRY *LPALGETLISTENERF)(ALenum param, ALfloat *value) AL_API_NOEXCEPT17;
  545. typedef void (AL_APIENTRY *LPALGETLISTENER3F)(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT17;
  546. typedef void (AL_APIENTRY *LPALGETLISTENERFV)(ALenum param, ALfloat *values) AL_API_NOEXCEPT17;
  547. typedef void (AL_APIENTRY *LPALGETLISTENERI)(ALenum param, ALint *value) AL_API_NOEXCEPT17;
  548. typedef void (AL_APIENTRY *LPALGETLISTENER3I)(ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT17;
  549. typedef void (AL_APIENTRY *LPALGETLISTENERIV)(ALenum param, ALint *values) AL_API_NOEXCEPT17;
  550. typedef void (AL_APIENTRY *LPALGENSOURCES)(ALsizei n, ALuint *sources) AL_API_NOEXCEPT17;
  551. typedef void (AL_APIENTRY *LPALDELETESOURCES)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
  552. typedef ALboolean (AL_APIENTRY *LPALISSOURCE)(ALuint source) AL_API_NOEXCEPT17;
  553. typedef void (AL_APIENTRY *LPALSOURCEF)(ALuint source, ALenum param, ALfloat value) AL_API_NOEXCEPT17;
  554. typedef void (AL_APIENTRY *LPALSOURCE3F)(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT17;
  555. typedef void (AL_APIENTRY *LPALSOURCEFV)(ALuint source, ALenum param, const ALfloat *values) AL_API_NOEXCEPT17;
  556. typedef void (AL_APIENTRY *LPALSOURCEI)(ALuint source, ALenum param, ALint value) AL_API_NOEXCEPT17;
  557. typedef void (AL_APIENTRY *LPALSOURCE3I)(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT17;
  558. typedef void (AL_APIENTRY *LPALSOURCEIV)(ALuint source, ALenum param, const ALint *values) AL_API_NOEXCEPT17;
  559. typedef void (AL_APIENTRY *LPALGETSOURCEF)(ALuint source, ALenum param, ALfloat *value) AL_API_NOEXCEPT17;
  560. typedef void (AL_APIENTRY *LPALGETSOURCE3F)(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT17;
  561. typedef void (AL_APIENTRY *LPALGETSOURCEFV)(ALuint source, ALenum param, ALfloat *values) AL_API_NOEXCEPT17;
  562. typedef void (AL_APIENTRY *LPALGETSOURCEI)(ALuint source, ALenum param, ALint *value) AL_API_NOEXCEPT17;
  563. typedef void (AL_APIENTRY *LPALGETSOURCE3I)(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT17;
  564. typedef void (AL_APIENTRY *LPALGETSOURCEIV)(ALuint source, ALenum param, ALint *values) AL_API_NOEXCEPT17;
  565. typedef void (AL_APIENTRY *LPALSOURCEPLAYV)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
  566. typedef void (AL_APIENTRY *LPALSOURCESTOPV)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
  567. typedef void (AL_APIENTRY *LPALSOURCEREWINDV)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
  568. typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
  569. typedef void (AL_APIENTRY *LPALSOURCEPLAY)(ALuint source) AL_API_NOEXCEPT17;
  570. typedef void (AL_APIENTRY *LPALSOURCESTOP)(ALuint source) AL_API_NOEXCEPT17;
  571. typedef void (AL_APIENTRY *LPALSOURCEREWIND)(ALuint source) AL_API_NOEXCEPT17;
  572. typedef void (AL_APIENTRY *LPALSOURCEPAUSE)(ALuint source) AL_API_NOEXCEPT17;
  573. typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint source, ALsizei nb, const ALuint *buffers) AL_API_NOEXCEPT17;
  574. typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint source, ALsizei nb, ALuint *buffers) AL_API_NOEXCEPT17;
  575. typedef void (AL_APIENTRY *LPALGENBUFFERS)(ALsizei n, ALuint *buffers) AL_API_NOEXCEPT17;
  576. typedef void (AL_APIENTRY *LPALDELETEBUFFERS)(ALsizei n, const ALuint *buffers) AL_API_NOEXCEPT17;
  577. typedef ALboolean (AL_APIENTRY *LPALISBUFFER)(ALuint buffer) AL_API_NOEXCEPT17;
  578. typedef void (AL_APIENTRY *LPALBUFFERDATA)(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei samplerate) AL_API_NOEXCEPT17;
  579. typedef void (AL_APIENTRY *LPALBUFFERF)(ALuint buffer, ALenum param, ALfloat value) AL_API_NOEXCEPT17;
  580. typedef void (AL_APIENTRY *LPALBUFFER3F)(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT17;
  581. typedef void (AL_APIENTRY *LPALBUFFERFV)(ALuint buffer, ALenum param, const ALfloat *values) AL_API_NOEXCEPT17;
  582. typedef void (AL_APIENTRY *LPALBUFFERI)(ALuint buffer, ALenum param, ALint value) AL_API_NOEXCEPT17;
  583. typedef void (AL_APIENTRY *LPALBUFFER3I)(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT17;
  584. typedef void (AL_APIENTRY *LPALBUFFERIV)(ALuint buffer, ALenum param, const ALint *values) AL_API_NOEXCEPT17;
  585. typedef void (AL_APIENTRY *LPALGETBUFFERF)(ALuint buffer, ALenum param, ALfloat *value) AL_API_NOEXCEPT17;
  586. typedef void (AL_APIENTRY *LPALGETBUFFER3F)(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT17;
  587. typedef void (AL_APIENTRY *LPALGETBUFFERFV)(ALuint buffer, ALenum param, ALfloat *values) AL_API_NOEXCEPT17;
  588. typedef void (AL_APIENTRY *LPALGETBUFFERI)(ALuint buffer, ALenum param, ALint *value) AL_API_NOEXCEPT17;
  589. typedef void (AL_APIENTRY *LPALGETBUFFER3I)(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT17;
  590. typedef void (AL_APIENTRY *LPALGETBUFFERIV)(ALuint buffer, ALenum param, ALint *values) AL_API_NOEXCEPT17;
  591. typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)(ALfloat value) AL_API_NOEXCEPT17;
  592. typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)(ALfloat value) AL_API_NOEXCEPT17;
  593. typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)(ALfloat value) AL_API_NOEXCEPT17;
  594. typedef void (AL_APIENTRY *LPALDISTANCEMODEL)(ALenum distanceModel) AL_API_NOEXCEPT17;
  595. #ifdef __cplusplus
  596. } /* extern "C" */
  597. #endif
  598. /* NOLINTEND */
  599. #endif /* AL_AL_H */