al.h 29 KB

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