openalext.s4e 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. include:
  2. #define AL_NONE 0
  3. /* Boolean False. */
  4. #define AL_FALSE 0
  5. /** Boolean True. */
  6. #define AL_TRUE 1
  7. /** Indicate Source has relative coordinates. */
  8. #define AL_SOURCE_RELATIVE 0x202
  9. /**
  10. * Directional source, inner cone angle, in degrees.
  11. * Range: [0-360]
  12. * Default: 360
  13. */
  14. #define AL_CONE_INNER_ANGLE 0x1001
  15. /**
  16. * Directional source, outer cone angle, in degrees.
  17. * Range: [0-360]
  18. * Default: 360
  19. */
  20. #define AL_CONE_OUTER_ANGLE 0x1002
  21. /**
  22. * Specify the pitch to be applied at source.
  23. * Range: [0.5-2.0]
  24. * Default: 1.0
  25. */
  26. #define AL_PITCH 0x1003
  27. /**
  28. * Specify the current location in three dimensional space.
  29. * OpenAL, like OpenGL, uses a right handed coordinate system,
  30. * where in a frontal default view X (thumb) points right,
  31. * Y points up (index finger), and Z points towards the
  32. * viewer/camera (middle finger).
  33. * To switch from a left handed coordinate system, flip the
  34. * sign on the Z coordinate.
  35. * Listener position is always in the world coordinate system.
  36. */
  37. #define AL_POSITION 0x1004
  38. /** Specify the current direction. */
  39. #define AL_DIRECTION 0x1005
  40. /** Specify the current velocity in three dimensional space. */
  41. #define AL_VELOCITY 0x1006
  42. /**
  43. * Indicate whether source is looping.
  44. * Type: ALboolean?
  45. * Range: [AL_TRUE, AL_FALSE]
  46. * Default: FALSE.
  47. */
  48. #define AL_LOOPING 0x1007
  49. /**
  50. * Indicate the buffer to provide sound samples.
  51. * Type: _ALuint.
  52. * Range: any valid Buffer id.
  53. */
  54. #define AL_BUFFER 0x1009
  55. /**
  56. * Indicate the gain (volume amplification) applied.
  57. * Type: _ALfloat.
  58. * Range: ]0.0- ]
  59. * A value of 1.0 means un-attenuated/unchanged.
  60. * Each division by 2 equals an attenuation of -6dB.
  61. * Each multiplicaton with 2 equals an amplification of +6dB.
  62. * A value of 0.0 is meaningless with respect to a logarithmic
  63. * scale; it is interpreted as zero volume - the channel
  64. * is effectively disabled.
  65. */
  66. #define AL_GAIN 0x100A
  67. /*
  68. * Indicate minimum source attenuation
  69. * Type: _ALfloat
  70. * Range: [0.0 - 1.0]
  71. *
  72. * Logarthmic
  73. */
  74. #define AL_MIN_GAIN 0x100D
  75. /**
  76. * Indicate maximum source attenuation
  77. * Type: _ALfloat
  78. * Range: [0.0 - 1.0]
  79. *
  80. * Logarthmic
  81. */
  82. #define AL_MAX_GAIN 0x100E
  83. /**
  84. * Indicate listener orientation.
  85. *
  86. * at/up
  87. */
  88. #define AL_ORIENTATION 0x100F
  89. /**
  90. * Source state information.
  91. */
  92. #define AL_SOURCE_STATE 0x1010
  93. #define AL_INITIAL 0x1011
  94. #define AL_PLAYING 0x1012
  95. #define AL_PAUSED 0x1013
  96. #define AL_STOPPED 0x1014
  97. /**
  98. * Buffer Queue params
  99. */
  100. #define AL_BUFFERS_QUEUED 0x1015
  101. #define AL_BUFFERS_PROCESSED 0x1016
  102. /**
  103. * Source buffer position information
  104. */
  105. #define AL_SEC_OFFSET 0x1024
  106. #define AL_SAMPLE_OFFSET 0x1025
  107. #define AL_BYTE_OFFSET 0x1026
  108. /*
  109. * Source type (Static, Streaming or undetermined)
  110. * Source is Static if a Buffer has been attached using AL_BUFFER
  111. * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
  112. * Source is undetermined when it has the NULL buffer attached
  113. */
  114. #define AL_SOURCE_TYPE 0x1027
  115. #define AL_STATIC 0x1028
  116. #define AL_STREAMING 0x1029
  117. #define AL_UNDETERMINED 0x1030
  118. /** Sound samples: format specifier. */
  119. #define AL_FORMAT_MONO8 0x1100
  120. #define AL_FORMAT_MONO16 0x1101
  121. #define AL_FORMAT_STEREO8 0x1102
  122. #define AL_FORMAT_STEREO16 0x1103
  123. /**
  124. * source specific reference distance
  125. * Type: _ALfloat
  126. * Range: 0.0 - +inf
  127. *
  128. * At 0.0, no distance attenuation occurs. Default is
  129. * 1.0.
  130. */
  131. #define AL_REFERENCE_DISTANCE 0x1020
  132. /**
  133. * source specific rolloff factor
  134. * Type: _ALfloat
  135. * Range: 0.0 - +inf
  136. *
  137. */
  138. #define AL_ROLLOFF_FACTOR 0x1021
  139. /**
  140. * Directional source, outer cone gain.
  141. *
  142. * Default: 0.0
  143. * Range: [0.0 - 1.0]
  144. * Logarithmic
  145. */
  146. #define AL_CONE_OUTER_GAIN 0x1022
  147. /**
  148. * Indicate distance above which sources are not
  149. * attenuated using the inverse clamped distance model.
  150. *
  151. * Default: +inf
  152. * Type: _ALfloat
  153. * Range: 0.0 - +inf
  154. */
  155. #define AL_MAX_DISTANCE 0x1023
  156. /**
  157. * Sound samples: frequency, in units of Hertz [Hz].
  158. * This is the number of samples per second. Half of the
  159. * sample frequency marks the maximum significant
  160. * frequency component.
  161. */
  162. #define AL_FREQUENCY 0x2001
  163. #define AL_BITS 0x2002
  164. #define AL_CHANNELS 0x2003
  165. #define AL_SIZE 0x2004
  166. /**
  167. * Buffer state.
  168. *
  169. * Not supported for public use (yet).
  170. */
  171. #define AL_UNUSED 0x2010
  172. #define AL_PENDING 0x2011
  173. #define AL_PROCESSED 0x2012
  174. /** Errors: No Error. */
  175. #define AL_NO_ERROR 0
  176. /**
  177. * Invalid Name paramater passed to AL call.
  178. */
  179. #define AL_INVALID_NAME 0xA001
  180. /**
  181. * Invalid parameter passed to AL call.
  182. */
  183. #define AL_INVALID_ENUM 0xA002
  184. /**
  185. * Invalid enum parameter value.
  186. */
  187. #define AL_INVALID_VALUE 0xA003
  188. /**
  189. * Illegal call.
  190. */
  191. #define AL_INVALID_OPERATION 0xA004
  192. /**
  193. * No mojo.
  194. */
  195. #define AL_OUT_OF_MEMORY 0xA005
  196. /** Context strings: Vendor Name. */
  197. #define AL_VENDOR 0xB001
  198. #define AL_VERSION 0xB002
  199. #define AL_RENDERER 0xB003
  200. #define AL_EXTENSIONS 0xB004
  201. /** Global tweakage. */
  202. /**
  203. * Doppler scale. Default 1.0
  204. */
  205. #define AL_DOPPLER_FACTOR 0xC000
  206. /**
  207. * Tweaks speed of propagation.
  208. */
  209. #define AL_DOPPLER_VELOCITY 0xC001
  210. /**
  211. * Speed of Sound in units per second
  212. */
  213. #define AL_SPEED_OF_SOUND 0xC003
  214. /**
  215. * Distance models
  216. *
  217. * used in conjunction with DistanceModel
  218. *
  219. * implicit: NONE, which disances distance attenuation.
  220. */
  221. #define AL_DISTANCE_MODEL 0xD000
  222. #define AL_INVERSE_DISTANCE 0xD001
  223. #define AL_INVERSE_DISTANCE_CLAMPED 0xD002
  224. #define AL_LINEAR_DISTANCE 0xD003
  225. #define AL_LINEAR_DISTANCE_CLAMPED 0xD004
  226. #define AL_EXPONENT_DISTANCE 0xD005
  227. #define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
  228. #define _ALuint unsigned int
  229. #define _ALint int
  230. #define _ALCint int
  231. #define _ALsizei int
  232. #define _ALenum unsigned int
  233. #define _ALfloat float
  234. #define _ALCboolean char
  235. #define _ALvoid void
  236. typedef struct _ALCdevice _ALCdevice;
  237. typedef struct _ALCcontext _ALCcontext;
  238. #include "s3eTypes.h"
  239. functions:
  240. unsigned int _alGetError() 0
  241. void _alSourceQueueBuffers( _ALuint sid, _ALsizei numEntries, const _ALuint* bids)
  242. void _alSourceUnqueueBuffers( _ALuint sid, _ALsizei numEntries, _ALuint* bids )
  243. void _alGetSourcei( _ALuint sid, _ALenum param, _ALint* value )
  244. void _alGetSourcef( _ALuint sid, _ALenum param, _ALfloat* value )
  245. void _alSourcef( _ALuint sid, _ALenum param, _ALfloat value )
  246. void _alSourcei( _ALuint sid, _ALenum param, _ALint value )
  247. void _alSourcePlay( _ALuint sid )
  248. void _alSourceStop( _ALuint sid )
  249. void _alSourcePause( _ALuint sid )
  250. void _alGenSources( _ALsizei n, _ALuint* sources )
  251. void _alDeleteSources( _ALsizei n, const _ALuint* sources )
  252. void _alGenBuffers( _ALsizei n, _ALuint* buffers );
  253. void _alDeleteBuffers( _ALsizei n, const _ALuint* buffers );
  254. void _alBufferData( _ALuint bid, _ALenum format, const _ALvoid* data, _ALsizei size, _ALsizei freq );
  255. _ALCdevice* _alcOpenDevice( const char* devicename ) 0
  256. void _alcCloseDevice( _ALCdevice* device )
  257. _ALCcontext * _alcCreateContext( _ALCdevice* device, const _ALCint* attrlist ) 0
  258. _ALCboolean _alcMakeContextCurrent( _ALCcontext* context ) 0
  259. void _alcProcessContext( _ALCcontext* context )
  260. void _alcSuspendContext( _ALCcontext* context )
  261. void _alcDestroyContext( _ALCcontext* context )
  262. _ALCcontext * _alcGetCurrentContext() 0