openal.bmx 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325
  1. Strict
  2. Rem
  3. bbdoc: Audio/OpenAL 1.1
  4. about:
  5. <table>
  6. <tr><th>Constants</th><th>Description</th></tr>
  7. <tr><td>AL_INVALID<br>AL_NONE</td><td>bad value</td></tr>
  8. <tr><td>AL_FALSE</td><td>Boolean False.</td></tr>
  9. <tr><td>AL_TRUE</td><td>Boolean True.</td></tr>
  10. <tr><td>AL_SOURCE_RELATIVE</td><td>Indicate Source has relative coordinates.</td></tr>
  11. <tr><td>AL_CONE_INNER_ANGLE</td><td>Directional source, inner cone angle, in degrees.<br>Range: [0-360] <br>Default: 360</td></tr>
  12. <tr><td>AL_CONE_OUTER_ANGLE</td><td>Directional source, outer cone angle, in degrees.<br>Range: [0-360] <br>Default: 360</td></tr>
  13. <tr><td>AL_PITCH</td><td>Specify the pitch to be applied, either at source,or on mixer results, at listener.<br>Range: [0.5-2.0]<br>Default: 1.0</td></tr>
  14. <tr><td>AL_POSITION</td><td>Specify the current location in three dimensional space.<br>OpenAL, like OpenGL, uses a right handed coordinate system, where in a frontal default view X (thumb) points right, Y points up (index finger), and Z points towards the viewer/camera (middle finger). <br>To switch from a left handed coordinate system, flip the sign on the Z coordinate.<br>Listener position is always in the world coordinate system.</td></tr>
  15. <tr><td>AL_DIRECTION</td><td>Specify the current direction.</td></tr>
  16. <tr><td>AL_VELOCITY</td><td>Specify the current velocity in three dimensional space.</td></tr>
  17. <tr><td>AL_LOOPING</td><td>Indicate whether source is looping.<br>Type: ALboolean?<br>Range: [AL_TRUE, AL_FALSE]<br>Default: FALSE.</td></tr>
  18. <tr><td>AL_BUFFER</td><td>Indicate the buffer to provide sound samples. <br>Type: ALuint.<br>Range: any valid Buffer id.</td></tr>
  19. <tr><td>AL_GAIN</td><td>Indicate the gain (volume amplification) applied. <br>Type: ALfloat.<br>Range: ]0.0- ]<br>A value of 1.0 means un-attenuated/unchanged.<br>Each division by 2 equals an attenuation of -6dB.<br>Each multiplicaton with 2 equals an amplification of +6dB.<br>A value of 0.0 is meaningless with respect to a logarithmic scale; it is interpreted as zero volume - the channel is effectively disabled.</td></tr>
  20. <tr><td>AL_MIN_GAIN</td><td>Indicate minimum source attenuation<br>Type: ALfloat<br>Range: [0.0 - 1.0]</td></tr>
  21. <tr><td>AL_MAX_GAIN</td><td>Indicate maximum source attenuation<br>Type: ALfloat<br>Range: [0.0 - 1.0]</td></tr>
  22. <tr><td>AL_ORIENTATION</td><td>Indicate listener orientation.</td></tr>
  23. <tr><td>AL_CHANNEL_MASK</td><td>Specify the channel mask. (Creative)<br>Type: ALuint<br>Range: [0 - 255]</td></tr>
  24. <tr><td>AL_SOURCE_STATE<br>AL_INITIAL<br>AL_PLAYING<br>AL_PAUSED<br>AL_STOPPED</td><td>Source state information.</td></tr>
  25. <tr><td>AL_BUFFERS_QUEUED<br>AL_BUFFERS_PROCESSED</td><td>Buffer Queue params</td></tr>
  26. <tr><td>AL_SEC_OFFSET<br>AL_SAMPLE_OFFSET<br>AL_BYTE_OFFSET</td><td>Source buffer position information</td></tr>
  27. <tr><td>AL_SOURCE_TYPE</td><td>Source type (Static, Streaming or undetermined)</td></tr>
  28. <tr><td>AL_STATIC</td><td>Source is Static if a Buffer has been attached using AL_BUFFER</td></tr>
  29. <tr><td>AL_STREAMING</td><td>Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers</td></tr>
  30. <tr><td>AL_UNDETERMINED</td><td>Source is undetermined when it has the NULL buffer attached</td></tr>
  31. <tr><td>AL_FORMAT_MONO8<br>AL_FORMAT_STEREO8<br>AL_FORMAT_MONO16<br>AL_FORMAT_STEREO16</td><td>Sound samples: format specifier.</td></tr>
  32. <tr><td>AL_REFERENCE_DISTANCE</td><td>source specific reference distance<br>Type: ALfloat<br>Range: 0.0 - +inf<br><br>at 0.0, no distance attenuation occurs. Default is 1.0.</td></tr>
  33. <tr><td>AL_ROLLOFF_FACTOR</td><td>source specific rolloff factor<br>Type: ALfloat<br>Range: 0.0 - +inf</td></tr>
  34. <tr><td>AL_CONE_OUTER_GAIN</td><td>Directional source, outer cone gain.<br>Default: 0.0<br>Range: [0.0 - 1.0]</td></tr>
  35. <tr><td>AL_MAX_DISTANCE</td><td>Indicate distance above which sources are not attenuated using the inverse clamped distance model.<br>Default: +inf<br>Type: ALfloat</td></tr>
  36. <tr><td>AL_FREQUENCY<br>AL_BITS<br>AL_CHANNELS<br>AL_SIZE</td><td>frequency, in units of Hertz [Hz].<br>This is the number of samples per second. Half of the sample frequency marks the maximum significant frequency component.</td></tr>
  37. <tr><td>AL_UNUSED<br>AL_PENDING<br>AL_PROCESSED</td><td>Buffer state.<br>not supported for public use (yet).</td></tr>
  38. <tr><td>AL_NO_ERROR</td><td>No Error</td></tr>
  39. <tr><td>AL_INVALID_NAME</td><td>Invalid Name paramater passed to AL call.</td></tr>
  40. <tr><td>AL_ILLEGAL_ENUM<br>AL_INVALID_ENUM</td><td>Invalid parameter passed to AL call.</td></tr>
  41. <tr><td>AL_INVALID_VALUE</td><td>Invalid enum parameter value.</td></tr>
  42. <tr><td>AL_ILLEGAL_COMMAND<br>AL_INVALID_OPERATION</td><td>Illegal call.</td></tr>
  43. <tr><td>AL_OUT_OF_MEMORY</td><td>No mojo.</td></tr>
  44. <tr><td>AL_VENDOR<br>AL_VERSION<br>AL_RENDERER<br>AL_EXTENSIONS</td><td>Context strings: Vendor Name.</td></tr>
  45. <tr><td>AL_DOPPLER_FACTOR</td><td>Doppler scale. Default 1.0</td></tr>
  46. <tr><td>AL_DOPPLER_VELOCITY</td><td>Tweaks speed of propagation.</td></tr>
  47. <tr><td>AL_SPEED_OF_SOUND</td><td>Speed of Sound in units per second</td></tr>
  48. <tr><td>AL_DISTANCE_MODEL<br>AL_INVERSE_DISTANCE<br>AL_INVERSE_DISTANCE_CLAMPED<br>AL_LINEAR_DISTANCE<br>AL_LINEAR_DISTANCE_CLAMPED<br>AL_EXPONENT_DISTANCE<br>AL_EXPONENT_DISTANCE_CLAMPED</td><td>Distance models<br><br>used in conjunction with DistanceModel<br><br>implicit: NONE, which disances distance attenuation.</td></tr>
  49. </table><br>
  50. <table>
  51. <tr><th>ALC constants</th><th>Description</th></tr>
  52. <tr><td>ALC_FALSE</td><td>False</td></tr>
  53. <tr><td>ALC_TRUE</td><td>True</td></tr>
  54. <tr><td>ALC_FREQUENCY</td><td>Frequency for mixing output buffer, in units of Hz</td></tr>
  55. <tr><td>ALC_REFRESH</td><td>Refresh intervals, in units of Hz</td></tr>
  56. <tr><td>ALC_SYNC</td><td>Flag, indicating a synchronous context</td></tr>
  57. <tr><td>ALC_MONO_SOURCES</td><td>A hint indicating how many sources should be capable of supporting mono data</td></tr>
  58. <tr><td>ALC_STEREO_SOURCES</td><td>A hint indicating how many sources should be capable of supporting stereo data</td></tr>
  59. <tr><td>ALC_NO_ERROR</td><td>There is no current error.</td></tr>
  60. <tr><td>ALC_INVALID_DEVICE</td><td>The device handle or specifier names an accessible driver/server</td></tr>
  61. <tr><td>ALC_INVALID_CONTEXT</td><td>The Context argument does not name a valid context.</td></tr>
  62. <tr><td>ALC_INVALID_ENUM</td><td>A token used is not valid, or not applicable.</td></tr>
  63. <tr><td>ALC_INVALID_VALUE</td><td>A value (e.g. Attribute) is not valid, or not applicable.</td></tr>
  64. <tr><td>ALC_OUT_OF_MEMORY</td><td>Unable to allocate memory.</td></tr>
  65. <tr><td>ALC_DEFAULT_DEVICE_SPECIFIER</td><td>The specifier string for the default device</td></tr>
  66. <tr><td>ALC_DEVICE_SPECIFIER</td><td>The specifier string for the device</td></tr>
  67. <tr><td>ALC_EXTENSIONS</td><td>A list of available context extensions separated by spaces.</td></tr>
  68. <tr><td>ALC_MAJOR_VERSION</td><td>The specification revision for this implementation (major version). NULL is an acceptable device.</td></tr>
  69. <tr><td>ALC_MINOR_VERSION</td><td>The specification revision for this implementation (minor version). NULL is an acceptable device.</td></tr>
  70. <tr><td>ALC_ATTRIBUTES_SIZE</td><td>The size (number of ALCint values) required for a zero-terminated attributes list, for the current context. NULL is an invalid device.</td></tr>
  71. <tr><td>ALC_ALL_ATTRIBUTES</td><td>Expects a destination of ALC_ATTRIBUTES_SIZE, and provides an attribute list for the current context of the specified device. NULL is an invalid device.</td></tr>
  72. <tr><td>ALC_CAPTURE_DEVICE_SPECIFIER</td><td>The name of the specified capture device, or a list of all available capture devices if no capture device is specified.</td></tr>
  73. <tr><td>ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER</td><td>The name of the default capture device</td></tr>
  74. <tr><td>ALC_CAPTURE_SAMPLES</td><td>The number of capture samples available. NULL is an invalid device.</td></tr>
  75. </table><br>
  76. End Rem
  77. Module Pub.OpenAL
  78. ModuleInfo "Version: 1.03"
  79. ModuleInfo "Modserver: BRL"
  80. ModuleInfo "History: 1.03 Release"
  81. ModuleInfo "History: alGetProcAddress now returns Byte Ptr"
  82. ModuleInfo "History: 1.02 Release"
  83. ModuleInfo "History: Added missing func check"
  84. ModuleInfo "History: Fixed mispelled funcs"
  85. ModuleInfo "History: Added Redi's docs"
  86. ModuleInfo "History: 1.01 Initial Release"
  87. Import "openal.c"
  88. ' download openal runtime library from http://www.openal.org
  89. Private
  90. Extern
  91. Function LoadOpenAL()
  92. Function GetOpenALFunction:Byte Ptr( fname$z )
  93. End Extern
  94. Global _ok=LoadOpenAL()
  95. Function P:Byte Ptr(t$)
  96. Return GetOpenALFunction( t )
  97. End Function
  98. Public
  99. Rem
  100. bbdoc: Check if OpenAL is installed.
  101. returns: True if OpenAL is installed.
  102. about:
  103. This function allows you to determine whether OpenAL is installed on the current machine.
  104. End Rem
  105. Function OpenALInstalled()
  106. Return _ok
  107. End Function
  108. '***** alc *****
  109. Const ALC_FALSE=0
  110. Const ALC_TRUE=1
  111. Const ALC_FREQUENCY=$1007
  112. Const ALC_REFRESH=$1008
  113. Const ALC_SYNC=$1009
  114. Const ALC_MONO_SOURCES=$1010
  115. Const ALC_STEREO_SOURCES=$1011
  116. Const ALC_NO_ERROR=ALC_FALSE
  117. Const ALC_INVALID_DEVICE=$a001
  118. Const ALC_INVALID_CONTEXT=$a002
  119. Const ALC_INVALID_ENUM=$a003
  120. Const ALC_INVALID_VALUE=$a004
  121. Const ALC_OUT_OF_MEMORY=$a005
  122. Const ALC_DEFAULT_DEVICE_SPECIFIER=$1004
  123. Const ALC_DEVICE_SPECIFIER=$1005
  124. Const ALC_EXTENSIONS=$1006
  125. Const ALC_MAJOR_VERSION=$1000
  126. Const ALC_MINOR_VERSION=$1001
  127. Const ALC_ATTRIBUTES_SIZE=$1002
  128. Const ALC_ALL_ATTRIBUTES=$1003
  129. Const ALC_CAPTURE_DEVICE_SPECIFIER=$310
  130. Const ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER=$311
  131. Const ALC_CAPTURE_SAMPLES=$312
  132. Rem
  133. bbdoc: This function opens a device by name.
  134. about:
  135. <table><tr><th>Parameters</th><th>Description</th></tr>
  136. <tr><td>devicename</td><td>a null-terminated string describing a device</td></tr></table><br>
  137. The return value will be NULL if there is an error.<br><br>
  138. Returns a pointer to the opened device. Will return NULL if a device can not be opened.
  139. End Rem
  140. Global alcOpenDevice( devicename$z )=P("alcOpenDevice")
  141. Rem
  142. bbdoc: This function closes a device by name.
  143. about:
  144. <table><tr><th>Parameters</th><th>Description</th></tr>
  145. <tr><td>device</td><td>a pointer to an opened device</td></tr></table><br>
  146. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  147. <tr><td>ALC_INVALID_DEVICE</td><td>The specified device name doesn't exist.</td></tr></table><br>
  148. Any contexts and buffers within the device will be destroyed when the device is closed, and ALC_TRUE will be returned on success or ALC_FALSE on failure.
  149. End Rem
  150. Global alcCloseDevice( device )=P("alcCloseDevice")
  151. Rem
  152. bbdoc: This function retrieves the current context error state.
  153. about:
  154. <table><tr><th>Parameters</th><th>Description</th></tr>
  155. <tr><td>device</td><td>a pointer to the device to retrieve the error state from</td></tr></table><br>
  156. End Rem
  157. Global alcGetError( device )=P("alcGetError")
  158. Rem
  159. bbdoc: This function returns pointers to strings related to the context.
  160. about:
  161. <table><tr><th>Parameters</th><th>Description</th></tr>
  162. <tr><td>device</td><td>a pointer to the device to be queried</td></tr>
  163. <tr><td>param</td><td>an attribute to be retrieved:<br>ALC_DEFAULT_DEVICE_SPECIFIER<br>ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER<br>ALC_DEVICE_SPECIFIER<br>ALC_CAPTURE_DEVICE_SPECIFIER<br>ALC_EXTENSIONS</td></tr></table><br>
  164. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  165. <tr><td>ALC_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr></table><br>
  166. ALC_DEFAULT_DEVICE_SPECIFIER will return the name of the default output device.<br><br>
  167. ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER will return the name of the default capture device.<br><br>
  168. ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters.<br><br>
  169. ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied.<br><br>
  170. ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.<br><br>
  171. End Rem
  172. Global alcGetString:Byte Ptr( device,param )=P("alcGetString")
  173. Rem
  174. bbdoc: This function returns integers related to the context.
  175. about:
  176. <table><tr><th>Parameters</th><th>Description</th></tr>
  177. <tr><td>device</td><td>a pointer to the device to be queried</td></tr>
  178. <tr><td>param</td><td>an attribute to be retrieved:<br>ALC_MAJOR_VERSION<br>ALC_MINOR_VERSION<br>ALC_ATTRIBUTES_SIZE<br>ALC_ALL_ATTRIBUTES</td></tr>
  179. <tr><td>size</td><td>the size of the destination buffer provided</td></tr>
  180. <tr><td>data</td><td>a pointer to the data to be returned</td></tr></table><br>
  181. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  182. <tr><td>ALC_INVALID_VALUE</td><td>The specified data pointer or size is not valid.</td></tr>
  183. <tr><td>ALC_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  184. <tr><td>ALC_INVALID_DEVICE</td><td>The specified device is not valid.</td></tr>
  185. <tr><td>ALC_INVALID_CONTEXT</td><td>The specified context is not valid.</td></tr></table><br>
  186. The versions returned refer to the specification version that the implementation meets.
  187. End Rem
  188. Global alcGetIntegerv( device,param,size,data:Int Ptr )=P("alcGetIntegerv")
  189. Rem
  190. bbdoc: This function creates a context using a specified device.
  191. about:
  192. <table><tr><th>Parameters</th><th>Description</th></tr>
  193. <tr><td>device</td><td>a pointer to a device</td></tr>
  194. <tr><td>attrlist</td><td>a pointer to a set of attributes:<br>ALC_FREQUENCY<br>ALC_REFRESH<br>ALC_SYNC</td></tr></table><br>
  195. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  196. <tr><td>ALC_INVALID_VALUE</td><td>An additional context can not be created for this device.</td></tr>
  197. <tr><td>ALC_INVALID_DEVICE</td><td>The specified device is not a valid output device.</td></tr></table><br>
  198. returns: A pointer to the new context (NULL on failure).
  199. End Rem
  200. Global alcCreateContext( device,attrlist:Int Ptr )=P("alcCreateContext")
  201. Rem
  202. bbdoc: This function makes a specified context the current context.
  203. about:
  204. <table><tr><th>Parameters</th><th>Description</th></tr>
  205. <tr><td>context</td><td>a pointer to the new context</td></tr></table><br>
  206. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  207. <tr><td>ALC_INVALID_CONTEXT</td><td>The specified context is invalid.</td></tr></table><br>
  208. Returns ALC_TRUE on success, or ALC_FALSE on failure.
  209. End Rem
  210. Global alcMakeContextCurrent( context )=P("alcMakeContextCurrent")
  211. Rem
  212. bbdoc: This function tells a context to begin processing.
  213. about:
  214. <table><tr><th>Parameters</th><th>Description</th></tr>
  215. <tr><td>context</td><td>a pointer to the new context</td></tr></table><br>
  216. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  217. <tr><td>ALC_INVALID_CONTEXT</td><td>The specified context is invalid.</td></tr></table><br>
  218. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. #alcSuspendContext can be used to suspend a context, and then all the OpenAL state changes can be applied at once, followed by a call to alcProcessContext to apply all the state changes immediately. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.
  219. End Rem
  220. Global alcProcessContext( context )=P("alcProcessContext")
  221. Rem
  222. bbdoc: This function suspends processing on a specified context.
  223. about:
  224. <table><tr><th>Parameters</th><th>Description</th></tr>
  225. <tr><td>context</td><td>a pointer to the context to be suspended</td></tr></table><br>
  226. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  227. <tr><td>ALC_INVALID_CONTEXT</td><td>The specified context is invalid.</td></tr></table><br>
  228. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. A typical use of alcSuspendContext would be to suspend a context, apply all the OpenAL state changes at once, and then call #alcProcessContext to apply all the state changes at once. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.
  229. End Rem
  230. Global alcSuspendContext( context )=P("alcSuspendContext")
  231. Rem
  232. bbdoc: This function destroys a context.
  233. about:
  234. <table><tr><th>Parameters</th><th>Description</th></tr>
  235. <tr><td>context</td><td>a pointer to the new context</td></tr></table><br>
  236. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  237. <tr><td>ALC_INVALID_CONTEXT</td><td>The specified context is invalid.</td></tr></table><br>
  238. A context which is not current can be destroyed at any time (all sources within that context will also be deleted - buffers are not affected). #alcMakeContextCurrent should be used to make sure the context to be destroyed is not current (NULL is valid for #alcMakeContextCurrent).
  239. End Rem
  240. Global alcDestroyContext( context )=P("alcDestroyContext")
  241. Rem
  242. bbdoc: This function retrieves the current context.
  243. returns: a pointer to the current context.
  244. End Rem
  245. Global alcGetCurrentContext()=P("alcGetCurrentContext")
  246. Rem
  247. bbdoc: This function retrieves a context's device pointer.
  248. about:
  249. <table><tr><th>Parameters</th><th>Description</th></tr>
  250. <tr><td>context</td><td>a pointer to a context</td></tr></table><br>
  251. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  252. <tr><td>ALC_INVALID_CONTEXT</td><td>The specified context is invalid.</td></tr></table><br>
  253. Returns: a pointer to the specified context's device.
  254. End Rem
  255. Global alcGetContextsDevice( context )=P("alcGetContextsDevice")
  256. Rem
  257. bbdoc: This function queries if a specified context extension is available.
  258. about:
  259. <table><tr><th>Parameters</th><th>Description</th></tr>
  260. <tr><td>device</td><td>a pointer to the device to be queried for an extension</td></tr>
  261. <tr><td>extName</td><td>a null-terminated string describing the extension</td></tr></table><br>
  262. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  263. <tr><td>ALC_INVALID_VALUE</td><td>The string pointer is not valid.</td></tr></table><br>
  264. Returns ALC_TRUE if the extension is available, ALC_FALSE if the extension is not available.
  265. End Rem
  266. Global alcIsExtensionPresent( device,extName$z )=P("alcIsExtensionPresent")
  267. Rem
  268. bbdoc: This function retrieves the address of a specified context extension function.
  269. about:
  270. <table><tr><th>Parameters</th><th>Description</th></tr>
  271. <tr><td>device</td><td>a pointer to the device to be queried for the function</td></tr>
  272. <tr><td>funcName</td><td>a null-terminated string describing the function</td></tr></table><br>
  273. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  274. <tr><td>ALC_INVALID_VALUE</td><td>The string pointer is not valid.</td></tr></table><br>
  275. Returns the address of the function, or NULL if it is not found.
  276. End Rem
  277. Global alcGetProcAddress:Byte Ptr( device,funcName$z )=P("alcGetProcAddress")
  278. Rem
  279. bbdoc: This function retrieves the enum value for a specified enumeration name.
  280. about:
  281. <table><tr><th>Parameters</th><th>Description</th></tr>
  282. <tr><td>device</td><td>a pointer to the device to be queried</td></tr>
  283. <tr><td>enumName</td><td>a null terminated string describing the enum value</td></tr></table><br>
  284. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  285. <tr><td>ALC_INVALID_VALUE</td><td>The string pointer is not valid.</td></tr></table><br>
  286. Returns the enum value described by the enumName string. This is most often used for querying an enum value for an ALC extension.
  287. End Rem
  288. Global alcGetEnumValue( device,enumName$z )=P("alcGetEnumValue")
  289. Rem
  290. bbdoc: This function opens a capture device by name.
  291. about:
  292. <table><tr><th>Parameters</th><th>Description</th></tr>
  293. <tr><td>devicename</td><td>a pointer to a device name string</td></tr>
  294. <tr><td>frequency</td><td>the frequency that the data should be captured at</td></tr>
  295. <tr><td>format</td><td>the requested capture buffer format</td></tr>
  296. <tr><td>buffersize</td><td>the size of the capture buffer</td></tr></table><br>
  297. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  298. <tr><td>ALC_INVALID_VALUE</td><td>One of the parameters has an invalid value.</td></tr>
  299. <tr><td>ALC_OUT_OF_MEMORY</td><td>The specified device is invalid, or can not capture audio.</td></tr></table><br>
  300. Returns the capture device pointer, or NULL on failure.
  301. End Rem
  302. Global alcCaptureOpenDevice( devicename$z,frequency,format,buffersize )=P("alcCaptureOpenDevice")
  303. Rem
  304. bbdoc: This function closes the specified capture device.
  305. about:
  306. <table><tr><th>Parameters</th><th>Description</th></tr>
  307. <tr><td>device</td><td>a pointer to a capture device</td></tr></table><br>
  308. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  309. <tr><td>ALC_INVALID_DEVICE</td><td>The specified device is not a valid capture device.</td></tr></table><br>
  310. Returns ALC_TRUE if the close operation was successful, ALC_FALSE on failure.
  311. End Rem
  312. Global alcCaptureCloseDevice( device )=P("alcCaptureCloseDevice")
  313. Rem
  314. bbdoc: This function begins a capture operation.
  315. about:
  316. <table><tr><th>Parameters</th><th>Description</th></tr>
  317. <tr><td>device</td><td>a pointer to a capture device</td></tr></table><br>
  318. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  319. <tr><td>ALC_INVALID_DEVICE</td><td>The specified device is not a valid capture device.</td></tr></table><br>
  320. alcCaptureStart will begin recording to an internal ring buffer of the size specified when opening the capture device. The application can then retrieve the number of samples currently available using the ALC_CAPTURE_SAPMPLES token with #alcGetIntegerv. When the application determines that enough samples are available for processing, then it can obtain them with a call to #alcCaptureSamples.
  321. End Rem
  322. Global alcCaptureStart( device )=P("alcCaptureStart")
  323. Rem
  324. bbdoc: This function stops a capture operation.
  325. about:
  326. <table><tr><th>Parameters</th><th>Description</th></tr>
  327. <tr><td>device</td><td>a pointer to a capture device</td></tr></table><br>
  328. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  329. <tr><td>ALC_INVALID_DEVICE</td><td>The specified device is not a valid capture device.</td></tr></table><br>
  330. End Rem
  331. Global alcCaptureStop( device )=P("alcCaptureStop")
  332. Rem
  333. bbdoc: This function completes a capture operation.
  334. about:
  335. <table><tr><th>Parameters</th><th>Description</th></tr>
  336. <tr><td>device</td><td>a pointer to a capture device</td></tr>
  337. <tr><td>buffer</td><td>a pointer to a data buffer, which must be large enough to accommodate samples number of samples</td></tr>
  338. <tr><td>samples</td><td>the number of samples to be retrieved</td></tr></table><br>
  339. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  340. <tr><td>ALC_INVALID_VALUE</td><td>The specified number of samples is larger than the number of available samples.</td></tr>
  341. <tr><td>ALC_INVALID_DEVICE</td><td>The specified device is not a valid capture device.</td></tr></table><br>
  342. End Rem
  343. Global alcCaptureSamples( device,buffer:Byte Ptr,samples )=P("alcCaptureSamples")
  344. Const AL_NONE=0
  345. Const AL_FALSE=0
  346. Const AL_TRUE=1
  347. Const AL_SOURCE_RELATIVE=$202
  348. Const AL_CONE_INNER_ANGLE=$1001
  349. Const AL_CONE_OUTER_ANGLE=$1002
  350. Const AL_PITCH=$1003
  351. Const AL_POSITION=$1004
  352. Const AL_DIRECTION=$1005
  353. Const AL_VELOCITY=$1006
  354. Const AL_LOOPING=$1007
  355. Const AL_BUFFER=$1009
  356. Const AL_GAIN=$100a
  357. Const AL_MIN_GAIN=$100d
  358. Const AL_MAX_GAIN=$100e
  359. Const AL_ORIENTATION=$100f
  360. Const AL_SOURCE_STATE=$1010
  361. Const AL_INITIAL=$1011
  362. Const AL_PLAYING=$1012
  363. Const AL_PAUSED=$1013
  364. Const AL_STOPPED=$1014
  365. Const AL_BUFFERS_QUEUED=$1015
  366. Const AL_BUFFERS_PROCESSED=$1016
  367. Const AL_SEC_OFFSET=$1024
  368. Const AL_SAMPLE_OFFSET=$1025
  369. Const AL_BYTE_OFFSET=$1026
  370. Const AL_SOURCE_TYPE=$1027
  371. Const AL_STATIC=$1028
  372. Const AL_STREAMING=$1029
  373. Const AL_UNDETERMINED=$1030
  374. Const AL_FORMAT_MONO8=$1100
  375. Const AL_FORMAT_MONO16=$1101
  376. Const AL_FORMAT_STEREO8=$1102
  377. Const AL_FORMAT_STEREO16=$1103
  378. Const AL_REFERENCE_DISTANCE=$1020
  379. Const AL_ROLLOFF_FACTOR=$1021
  380. Const AL_CONE_OUTER_GAIN=$1022
  381. Const AL_MAX_DISTANCE=$1023
  382. Const AL_FREQUENCY=$2001
  383. Const AL_BITS=$2002
  384. Const AL_CHANNELS=$2003
  385. Const AL_SIZE=$2004
  386. Const AL_UNUSED=$2010
  387. Const AL_PENDING=$2011
  388. Const AL_PROCESSED=$2012
  389. Const AL_NO_ERROR=AL_FALSE
  390. Const AL_INVALID_NAME=$a001
  391. Const AL_INVALID_ENUM=$a002
  392. Const AL_INVALID_VALUE=$a003
  393. Const AL_INVALID_OPERATION=$a004
  394. Const AL_OUT_OF_MEMORY=$a005
  395. Const AL_VENDOR=$b001
  396. Const AL_VERSION=$b002
  397. Const AL_RENDERER=$b003
  398. Const AL_EXTENSIONS=$b004
  399. Const AL_DOPPLER_FACTOR=$c000
  400. Const AL_DOPPLER_VELOCITY=$c001
  401. Const AL_SPEED_OF_SOUND=$c003
  402. Const AL_DISTANCE_MODEL=$d000
  403. Const AL_INVERSE_DISTANCE=$d001
  404. Const AL_INVERSE_DISTANCE_CLAMPED=$d002
  405. Const AL_LINEAR_DISTANCE=$d003
  406. Const AL_LINEAR_DISTANCE_CLAMPED=$d004
  407. Const AL_EXPONENT_DISTANCE=$d005
  408. Const AL_EXPONENT_DISTANCE_CLAMPED=$d006
  409. Rem
  410. bbdoc: This function enables a feature of the OpenAL driver.
  411. about:
  412. <table><tr><th>Parameters</th><th>Description</th></tr>
  413. <tr><td>capability</td><td>the name of a capability to enable</td></tr></table><br>
  414. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  415. <tr><td>AL_INVALID_ENUM</td><td>The specified capability is not valid.</td></tr>
  416. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  417. There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.
  418. End Rem
  419. Global alEnable( capability )=P("alEnable")
  420. Rem
  421. bbdoc: This function disables a feature of the OpenAL driver.
  422. about:
  423. <table><tr><th>Parameters</th><th>Description</th></tr>
  424. <tr><td>capability</td><td>the name of a capability to disable</td></tr></table><br>
  425. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  426. <tr><td>AL_INVALID_ENUM</td><td>The specified capability is not valid.</td></tr>
  427. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  428. There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.
  429. End Rem
  430. Global alDisable( capability )=P("alDisable")
  431. Rem
  432. bbdoc: This function returns a boolean indicating if a specific feature is enabled in the OpenAL
  433. about:
  434. <table><tr><th>Parameters</th><th>Description</th></tr>
  435. <tr><td>capability</td><td>the name of a capability to disable</td></tr></table><br>
  436. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  437. <tr><td>AL_INVALID_ENUM</td><td>The specified capability is not valid.</td></tr>
  438. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  439. Returns AL_TRUE if the capability is enabled, AL_FALSE if the capability is disabled. There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.
  440. End Rem
  441. Global alIsEnabled( capability )=P("alIsEnabled")
  442. Rem
  443. bbdoc: This function retrieves an OpenAL string property.
  444. about:
  445. <table><tr><th>Parameters</th><th>Description</th></tr>
  446. <tr><td>param</td><td>The property to be returned:<br>AL_VENDOR<br>AL_VERSION<br>AL_RENDERER<br>AL_EXTENSIONS</td></tr></table><br>
  447. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  448. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr></table><br>
  449. Returns a pointer to a null-terminated string.
  450. End Rem
  451. Global alGetString:Byte Ptr( param )=P("alGetString")
  452. Rem
  453. bbdoc: This function retrieves a boolean OpenAL state.
  454. about:
  455. <table><tr><th>Parameters</th><th>Description</th></tr>
  456. <tr><td>param</td><td>the state to be returned:<br>AL_DOPPLER_FACTOR<br>AL_SPEED_OF_SOUND<br>AL_DISTANCE_MODEL</td></tr>
  457. <tr><td>data</td><td>a pointer to the location where the state will be stored</td></tr></table><br>
  458. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  459. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  460. <tr><td>AL_INVALID_VALUE</td><td>The specified data pointer is not valid.</td></tr>
  461. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  462. End Rem
  463. Global alGetBooleanv( param,data:Byte Ptr )=P("alGetBooleanv")
  464. Rem
  465. bbdoc: This function retrieves an integer OpenAL state.
  466. about:
  467. <table><tr><th>Parameters</th><th>Description</th></tr>
  468. <tr><td>param</td><td>the state to be returned:<br>AL_DOPPLER_FACTOR<br>AL_SPEED_OF_SOUND<br>AL_DISTANCE_MODEL</td></tr>
  469. <tr><td>data</td><td>a pointer to the location where the state will be stored</td></tr></table><br>
  470. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  471. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  472. <tr><td>AL_INVALID_VALUE</td><td>The specified data pointer is not valid.</td></tr>
  473. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  474. End Rem
  475. Global alGetIntegerv( param,data:Int Ptr )=P("alGetIntegerv")
  476. Rem
  477. bbdoc: This function retrieves a floating point OpenAL state.
  478. about:
  479. <table><tr><th>Parameters</th><th>Description</th></tr>
  480. <tr><td>param</td><td>the state to be returned:<br>AL_DOPPLER_FACTOR<br>AL_SPEED_OF_SOUND<br>AL_DISTANCE_MODEL</td></tr>
  481. <tr><td>data</td><td>a pointer to the location where the state will be stored</td></tr></table><br>
  482. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  483. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  484. <tr><td>AL_INVALID_VALUE</td><td>The specified data pointer is not valid.</td></tr>
  485. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  486. End Rem
  487. Global alGetFloatv( param,data:Float Ptr )=P("alGetFloatv")
  488. Rem
  489. bbdoc: This function retrieves a double precision floating point OpenAL state.
  490. about:
  491. <table><tr><th>Parameters</th><th>Description</th></tr>
  492. <tr><td>param</td><td>the state to be returned:<br>AL_DOPPLER_FACTOR<br>AL_SPEED_OF_SOUND<br>AL_DISTANCE_MODEL</td></tr>
  493. <tr><td>data</td><td>a pointer to the location where the state will be stored</td></tr></table><br>
  494. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  495. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  496. <tr><td>AL_INVALID_VALUE</td><td>The specified data pointer is not valid.</td></tr>
  497. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  498. End Rem
  499. Global alGetDoublev( param,data:Double Ptr )=P("alGetDoublev")
  500. Rem
  501. bbdoc: This function returns a boolean OpenAL state.
  502. about:
  503. <table><tr><th>Parameters</th><th>Description</th></tr>
  504. <tr><td>param</td><td>the state to be queried:<br>AL_DOPPLER_FACTOR<br>AL_SPEED_OF_SOUND<br>AL_DISTANCE_MODEL</td></tr></table><br>
  505. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  506. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  507. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  508. The boolean state described by param will be returned.
  509. End Rem
  510. Global alGetBoolean( param )=P("alGetBoolean")
  511. Rem
  512. bbdoc: This function returns an integer OpenAL state.
  513. about:
  514. <table><tr><th>Parameters</th><th>Description</th></tr>
  515. <tr><td>param</td><td>the state to be queried:<br>AL_DOPPLER_FACTOR<br>AL_SPEED_OF_SOUND<br>AL_DISTANCE_MODEL</td></tr></table><br>
  516. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  517. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  518. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  519. The integer state described by param will be returned.
  520. End Rem
  521. Global alGetInteger( param )=P("alGetInteger")
  522. Rem
  523. bbdoc: This function returns a floating point OpenAL state.
  524. about:
  525. <table><tr><th>Parameters</th><th>Description</th></tr>
  526. <tr><td>param</td><td>the state to be queried:<br>AL_DOPPLER_FACTOR<br>AL_SPEED_OF_SOUND<br>AL_DISTANCE_MODEL</td></tr></table><br>
  527. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  528. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  529. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  530. The floating point state described by param will be returned.
  531. End Rem
  532. Global alGetFloat#( param )=P("alGetFloat")
  533. Rem
  534. bbdoc: This function returns a double precision floating point OpenAL state.
  535. about:
  536. <table><tr><th>Parameters</th><th>Description</th></tr>
  537. <tr><td>param</td><td>the state to be queried:<br>AL_DOPPLER_FACTOR<br>AL_SPEED_OF_SOUND<br>AL_DISTANCE_MODEL</td></tr></table><br>
  538. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  539. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  540. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  541. The double value described by param will be returned.
  542. End Rem
  543. Global alGetDouble!( param )=P("alGetDouble")
  544. Rem
  545. bbdoc: This function returns the current error state and then clears the error state.
  546. about: Returns an Alenum representing the error state. When an OpenAL error occurs, the error state is set and will not be changed until the error state is retrieved using alGetError. Whenever alGetError is called, the error state is cleared and the last state (the current state when the call was made) is returned. To isolate error detection to a specific portion of code, alGetError should be called before the isolated section to clear the current error state.
  547. End Rem
  548. Global alGetError()=P("alGetError")
  549. Rem
  550. bbdoc: This function tests if a specific extension is available for the OpenAL driver.
  551. about:
  552. <table><tr><th>Parameters</th><th>Description</th></tr>
  553. <tr><td>extname</td><td>a null-terminated string describing the desired extension</td></tr></table><br>
  554. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  555. <tr><td>AL_INVALID_VALUE</td><td>The specified extension string is not a valid pointer.</td></tr></table><br>
  556. Returns AL_TRUE if the extension is available, AL_FALSE if the extension is not available.
  557. End Rem
  558. Global alIsExtensionPresent( extname$z )=P("alIsExtensionPresent")
  559. Rem
  560. bbdoc: This function returns the address of an OpenAL extension function.
  561. about:
  562. <table><tr><th>Parameters</th><th>Description</th></tr>
  563. <tr><td>fname</td><td>a null-terminated string containing the function name</td></tr></table><br>
  564. The return value is a pointer to the specified function. The return value will be NULL if the function is not found.
  565. End Rem
  566. Global alGetProcAddress:Byte Ptr( fname$z )=P("alGetProcAddress")
  567. Rem
  568. bbdoc: This function returns the enumeration value of an OpenAL enum described by a string.
  569. about:
  570. <table><tr><th>Parameters</th><th>Description</th></tr>
  571. <tr><td>ename</td><td>a null-terminated string describing an OpenAL enum</td></tr></table><br>
  572. Returns the actual ALenum described by a string. Returns NULL if the string doesnt describe a valid OpenAL enum.
  573. EndRem
  574. Global alGetEnumValue( ename$z )=P("alGetEnumValue")
  575. Rem
  576. bbdoc: This function sets a floating point property for the listener. The relevant properties are listed in the table Listener Properties.
  577. about:
  578. <table><tr><th>Parameters</th><th>Description</th></tr>
  579. <tr><td>param</td><td>the name of the attribute to be set: AL_GAIN</td></tr>
  580. <tr><td>value</td><td>the ALfloat value to set the attribute to</td></tr></table><br>
  581. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  582. <tr><td>AL_INVALID_VALUE</td><td>The value given is not valid.</td></tr>
  583. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  584. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  585. End Rem
  586. Global alListenerf( param,value# )=P("alListenerf")
  587. Rem
  588. bbdoc: This function sets a floating point property for the listener. The relevant properties are listed in the table Listener Properties.
  589. about:
  590. <table><tr><th>Parameters</th><th>Description</th></tr>
  591. <tr><td>param</td><td>the name of the attribute to set:<br>AL_POSITION<br>AL_VELOCITY</td></tr>
  592. <tr><td>v1, v2, v3</td><td>the value to set the attribute to</td></tr></table><br>
  593. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  594. <tr><td>AL_INVALID_VALUE</td><td>The value given is not valid.</td></tr>
  595. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  596. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  597. End Rem
  598. Global alListener3f( param,value1#,value2#,value3# )=P("alListener3f")
  599. Rem
  600. bbdoc: This function sets a floating point-vector property of the listener. The relevant properties are listed in the table Listener Properties.
  601. about:
  602. <table><tr><th>Parameters</th><th>Description</th></tr>
  603. <tr><td>param</td><td>the name of the attribute to be set:<br>AL_POSITION<br>AL_VELOCITY<br>AL_ORIENTATION</td></tr>
  604. <tr><td>values</td><td>pointer to floating point-vector values</td></tr></table><br>
  605. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  606. <tr><td>AL_INVALID_VALUE</td><td>The value given is not valid.</td></tr>
  607. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  608. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  609. End Rem
  610. Global alListenerfv( param,values:Float Ptr )=P("alListenerfv")
  611. Rem
  612. bbdoc: This function sets an integer property of the listener.
  613. about:
  614. <table><tr><th>Parameters</th><th>Description</th></tr>
  615. <tr><td>param</td><td>the name of the attribute to be set</td></tr>
  616. <tr><td>value</td><td>the integer value to set the attribute to</td></tr></table><br>
  617. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  618. <tr><td>AL_INVALID_VALUE</td><td>The value given is not valid.</td></tr>
  619. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  620. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  621. There are no integer listener attributes defined for OpenAL 1.1, but this function may be used by an extension.
  622. End Rem
  623. Global alListeneri( param,value )=P("alListeneri")
  624. Rem
  625. bbdoc: This function sets an integer property of the listener. The relevant properties are listed in the table Listener Properties.
  626. about:
  627. <table><tr><th>Parameters</th><th>Description</th></tr>
  628. <tr><td>param</td><td>the name of the attribute to be set:<br>AL_POSITION<br>AL_VELOCITY</td></tr>
  629. <tr><td>value1, value2, value3</td><td>the integer values to set the attribute to</td></tr></table><br>
  630. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  631. <tr><td>AL_INVALID_VALUE</td><td>The value given is not valid.</td></tr>
  632. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  633. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  634. End Rem
  635. Global alListener3i( param,value1,value2,value3 )=P("alListener3i")
  636. Rem
  637. bbdoc: This function sets an integer property of the listener. The relevant properties are listed in the table Listener Properties.
  638. about:
  639. <table><tr><th>Parameters</th><th>Description</th></tr>
  640. <tr><td>param</td><td>the name of the attribute to be set:<br>AL_POSITION<br>AL_VELOCITY<br>AL_ORIENTATION</td></tr>
  641. <tr><td>values</td><td>pointer to the integer values to set the attribute to</td></tr></table><br>
  642. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  643. <tr><td>AL_INVALID_VALUE</td><td>The value given is not valid.</td></tr>
  644. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  645. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  646. End Rem
  647. Global alListeneriv( param,values:Int Ptr )=P("alListeneriv")
  648. Rem
  649. bbdoc: This function retrieves a floating point property of the listener. The relevant properties are listed in the table Listener Properties.
  650. about:
  651. <table><tr><th>Parameters</th><th>Description</th></tr>
  652. <tr><td>param</td><td>the name of the attribute to be retrieved: AL_GAIN</td></tr>
  653. <tr><td>value</td><td>a pointer to the floating point value being retrieved</td></tr></table><br>
  654. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  655. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  656. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  657. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  658. End Rem
  659. Global alGetListenerf( param,value:Float Ptr )=P("alGetListenerf")
  660. Rem
  661. bbdoc: This function retrieves a set of three floating point values from a property of the listener. The relevant properties are listed in the table Listener Properties.
  662. about:
  663. <table><tr><th>Parameters</th><th>Description</th></tr>
  664. <tr><td>param</td><td>the name of the attribute to be retrieved:<br>AL_POSITION<br>AL_VELOCITY</td></tr>
  665. <tr><td>value1, value2, value3</td><td>pointers to the three floating point being retrieved</td></tr></table><br>
  666. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  667. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  668. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  669. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  670. End Rem
  671. Global alGetListener3f( param,value1:Float Ptr,value2:Float Ptr,value3:Float Ptr )=P("alGetListener3f")
  672. Rem
  673. bbdoc: This function retrieves a floating point-vector property of the listener. The relevant properties are listed in the table Listener Properties.
  674. about:
  675. <table><tr><th>Parameters</th><th>Description</th></tr>
  676. <tr><td>param</td><td>the name of the attribute to be retrieved:<br>AL_POSITION<br>AL_VELOCITY<br>AL_ORIENTATION</td></tr>
  677. <tr><td>values</td><td>a pointer to the floating point-vector value being retrieved</td></tr></table><br>
  678. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  679. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  680. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  681. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  682. End Rem
  683. Global alGetListenerfv( param,values:Float Ptr )=P("alGetListenerfv")
  684. Rem
  685. bbdoc: This function retrieves an integer property of the listener.
  686. about:
  687. <table><tr><th>Parameters</th><th>Description</th></tr>
  688. <tr><td>param</td><td>the name of the attribute to be retrieved</td></tr>
  689. <tr><td>value</td><td>a pointer to the integer value being retrieved</td></tr></table><br>
  690. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  691. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  692. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  693. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  694. There are no integer listener attributes defined for OpenAL 1.1, but this function may be used by an extension.
  695. End Rem
  696. Global alGetListeneri( param,value:Int Ptr )=P("alGetListeneri")
  697. Rem
  698. bbdoc: This function retrieves an integer property of the listener. The relevant properties are listed in the table Listener Properties.
  699. about:
  700. <table><tr><th>Parameters</th><th>Description</th></tr>
  701. <tr><td>param</td><td>the name of the attribute to be retrieved:<br>AL_POSITION<br>AL_VELOCITY</td></tr>
  702. <tr><td>value1, value2, value3</td><td>pointers to the integer values being retrieved</td></tr></table><br>
  703. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  704. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  705. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  706. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  707. End Rem
  708. Global alGetListener3i( param,value1:Int Ptr,value2:Int Ptr,value3:Int Ptr )=P("alGetListener3i")
  709. Rem
  710. bbdoc: This function retrieves an integer property of the listener. The relevant properties are listed in the table Listener Properties.
  711. about:
  712. <table><tr><th>Parameters</th><th>Description</th></tr>
  713. <tr><td>param</td><td>the name of the attribute to be retrieved:<br>AL_POSITION<br>AL_VELOCITY<br>AL_ORIENTATION</td></tr>
  714. <tr><td>values</td><td>a pointer to the integer values being retrieved</td></tr></table><br>
  715. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  716. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  717. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  718. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  719. End Rem
  720. Global alGetListeneriv( param,values:Int Ptr )=P("alGetListeneriv")
  721. Rem
  722. bbdoc: This Function generates one or more buffers, which contain audio data (see #alBufferData). References To buffers are ALuint values, which are used wherever a buffer reference is needed (in calls such as #alDeleteBuffers, #alSourcei, #alSourceQueueBuffers, and #alSourceUnqueueBuffers).
  723. about:
  724. <table><tr><th>Parameters</th><th>Description</th></tr>
  725. <tr><td>n</td><td>the number of buffers To be generated</td></tr>
  726. <tr><td>buffers</td><td>pointer To an array of ALuint values which will store the names of the New buffers</td></tr></table><br>
  727. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  728. <tr><td>AL_INVALID_VALUE</td><td>The buffer array isn't large enough to hold the number of buffers requested.</td></tr>
  729. <tr><td>AL_OUT_OF_MEMORY</td><td>There is not enough memory available To generate all the buffers requested.</td></tr></table><br>
  730. If the requested number of buffers cannot be created, an error will be generated which can be detected with #alGetError. If an error occurs, no buffers will be generated. If n equals zero, #alGenBuffers does nothing and does not Return an error.
  731. End Rem
  732. Global alGenBuffers( n,buffers:Int Ptr )=P("alGenBuffers")
  733. Rem
  734. bbdoc: This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See #alSourcei and #alSourceUnqueueBuffers for information on how to detach a buffer from a source.
  735. about:
  736. <table><tr><th>Parameters</th><th>Description</th></tr>
  737. <tr><td>n</td><td>the number of buffers to be deleted</td></tr>
  738. <tr><td>buffers</td><td>pointer to an array of buffer names identifying the buffers to be deleted</td></tr></table><br>
  739. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  740. <tr><td>AL_INVALID_OPERATION</td><td>The buffer is still in use and can not be deleted.</td></tr>
  741. <tr><td>AL_INVALID_NAME</td><td>A buffer name is invalid.</td></tr>
  742. <tr><td>AL_INVALID_VALUE</td><td>The requested number of buffers can not be deleted.</td></tr></table><br>
  743. If the requested number of buffers cannot be deleted, an error will be generated which can be detected with #alGetError. If an error occurs, no buffers will be deleted. If n equals zero, #alDeleteBuffers does nothing and will not return an error.
  744. End Rem
  745. Global alDeleteBuffers( n,buffers:Int Ptr )=P("alDeleteBuffers")
  746. Rem
  747. bbdoc: This function tests if a buffer name is valid, returning AL_TRUE if valid, AL_FALSE if not.
  748. about:
  749. <table><tr><th>Parameters</th><th>Description</th></tr>
  750. <tr><td>bid</td><td>a buffer name to be tested for validity</td></tr></table><br>
  751. The NULL buffer is always valid (see #alSourcei for information on how the NULL buffer is used).
  752. End Rem
  753. Global alIsBuffer( bid )=P("alIsBuffer")
  754. Rem
  755. bbdoc: This function fills a buffer with audio data. All the pre-defined formats are PCM data, but this function may be used by extensions to load other data types as well.
  756. about:
  757. <table><tr><th>Parameters</th><th>Description</th></tr>
  758. <tr><td>bid</td><td>buffer name to be filled with data</td></tr>
  759. <tr><td>format</td><td>format type from among the following: AL_FORMAT_MONO8, AL_FORMAT_MONO16, AL_FORMAT_STEREO8, AL_FORMAT_STEREO16</td></tr>
  760. <tr><td>data</td><td>pointer to the audio data</td></tr>
  761. <tr><td>size</td><td>the size of the audio data in bytes</td></tr>
  762. <tr><td>freq</td><td>the frequency of the audio data</td></tr></table><br>
  763. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  764. <tr><td>AL_OUT_OF_MEMORY</td><td>There is not enough memory available to create this buffer.</td></tr>
  765. <tr><td>AL_INVALID_VALUE</td><td>The size parameter is not valid for the format specified, the buffer is in use, or the data is a NULL pointer.</td></tr>
  766. <tr><td>AL_INVALID_ENUM</td><td>The specified format does not exist.</td></tr></table><br>
  767. 8-bit PCM data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero. 16-bit PCM data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Stereo data is expressed in interleaved format, left channel first. Buffers containing more than one channel of data will be played without 3D spatialization.
  768. End Rem
  769. Global alBufferData( bid,format,data:Byte Ptr,size,freq )=P("alBufferData")
  770. Rem
  771. bbdoc: This Function sets a floating point property of a buffer.
  772. about:
  773. <table><tr><th>Parameters</th><th>Description</th></tr>
  774. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  775. <tr><td>param</td><td>the name of the attribute To be set</td></tr>
  776. <tr><td>value</td><td>the ALfloat value To be set</td></tr></table><br>
  777. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  778. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  779. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr></table><br>
  780. There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this Function may be used by OpenAL extensions.
  781. End Rem
  782. Global alBufferf( bid,param,value# )=P("alBufferf")
  783. Rem
  784. bbdoc: This function sets a floating point property of a buffer.
  785. about:
  786. <table><tr><th>Parameters</th><th>Description</th></tr>
  787. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  788. <tr><td>param</td><td>the name of the attribute to be set</td></tr>
  789. <tr><td>value1, value2, value3</td><td>the ALfloat values to be set</td></tr></table><br>
  790. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  791. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  792. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr></table><br>
  793. There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this function may be used by OpenAL extensions.
  794. End Rem
  795. Global alBuffer3f( bid,param,value1#,value2#,value3# )=P("alBuffer3f")
  796. Rem
  797. bbdoc: This function sets a floating point property of a buffer.
  798. about:
  799. <table><tr><th>Parameters</th><th>Description</th></tr>
  800. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  801. <tr><td>param</td><td>the name of the attribute to be set</td></tr>
  802. <tr><td>values</td><td>a pointer to the ALfloat values to be set</td></tr></table><br>
  803. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  804. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  805. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr></table><br>
  806. There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this function may be used by OpenAL extensions.
  807. End Rem
  808. Global alBufferfv( bid,param,values:Float Ptr )=P("alBufferfv")
  809. Rem
  810. bbdoc: This Function sets a floating point property of a buffer.
  811. about:
  812. <table><tr><th>Parameters</th><th>Description</th></tr>
  813. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  814. <tr><td>param</td><td>the name of the attribute To be set</td></tr>
  815. <tr><td>value</td><td>the ALint value To be set</td></tr></table><br>
  816. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  817. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  818. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr></table><br>
  819. There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this Function may be used by OpenAL extensions.
  820. End Rem
  821. Global alBufferi( bid,param,value )=P("alBufferi")
  822. Rem
  823. bbdoc: This Function sets a floating point property of a buffer.
  824. about:
  825. <table><tr><th>Parameters</th><th>Description</th></tr>
  826. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  827. <tr><td>param</td><td>the name of the attribute To be set</td></tr>
  828. <tr><td>value1, value2, value3</td><td>the ALint values To be set</td></tr></table><br>
  829. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  830. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  831. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr></table><br>
  832. There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this Function may be used by OpenAL extensions.
  833. End Rem
  834. Global alBuffer3i( bid,param,value1,value2,value3 )=P("alBuffer3i")
  835. Rem
  836. bbdoc: This Function sets a floating point property of a buffer.
  837. about:
  838. <table><tr><th>Parameters</th><th>Description</th></tr>
  839. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  840. <tr><td>param</td><td>the name of the attribute To be set</td></tr>
  841. <tr><td>values</td><td>a pointer To the ALint values To be set</td></tr></table><br>
  842. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  843. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  844. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr></table><br>
  845. There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call, but this Function may be used by OpenAL extensions.
  846. End Rem
  847. Global alBufferiv( bid,param,values:Int Ptr )=P("alBufferiv")
  848. Rem
  849. bbdoc: This Function retrieves a floating point property of a buffer.
  850. about:
  851. <table><tr><th>Parameters</th><th>Description</th></tr>
  852. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  853. <tr><td>pname</td><td>the name of the attribute To be retrieved</td></tr>
  854. <tr><td>value</td><td>a pointer to an ALfloat To hold the retrieved data</td></tr></table><br>
  855. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  856. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  857. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr>
  858. <tr><td>AL_INVALID_VALUE</td><td>The specified value pointer is not valid.</td></tr></table><br>
  859. There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.
  860. End Rem
  861. Global alGetBufferf( bid,param,value:Float Ptr )=P("alGetBufferf")
  862. Rem
  863. bbdoc: This Function retrieves a floating point property of a buffer.
  864. about:
  865. <table><tr><th>Parameters</th><th>Description</th></tr>
  866. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  867. <tr><td>pname</td><td>the name of the attribute To be retrieved</td></tr>
  868. <tr><td>value1, value2, value3</td><td>pointers to a ALfloat values To hold the retrieved data</td></tr></table><br>
  869. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  870. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  871. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr>
  872. <tr><td>AL_INVALID_VALUE</td><td>The specified value pointer is not valid.</td></tr></table><br>
  873. There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.
  874. End Rem
  875. Global alGetBuffer3f( bid,param,value1:Float Ptr,value2:Float Ptr,value3:Float Ptr )=P("alGetBuffer3f")
  876. Rem
  877. bbdoc: This Function retrieves a floating point property of a buffer.
  878. about:
  879. <table><tr><th>Parameters</th><th>Description</th></tr>
  880. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  881. <tr><td>pname</td><td>the name of the attribute to be retrieved</td></tr>
  882. <tr><td>values</td><td>pointer To an ALfloat vector To hold the retrieved data</td></tr></table><br>
  883. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  884. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  885. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr>
  886. <tr><td>AL_INVALID_VALUE</td><td>The specified value pointer is not valid.</td></tr></table><br>
  887. There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.
  888. End Rem
  889. Global alGetBufferfv( bid,param,values:Float Ptr )=P("alGetBufferfv")
  890. Rem
  891. bbdoc: This Function retrieves a floating point property of a buffer.
  892. about:
  893. <table><tr><th>Parameters</th><th>Description</th></tr>
  894. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  895. <tr><td>pname</td><td>the name of the attribute to be retrieved: AL_FREQUENCY, AL_BITS, AL_CHANNELS, AL_SIZE, AL_DATA</td></tr>
  896. <tr><td>value</td><td>a pointer To an ALint To hold the retrieved data</td></tr></table><br>
  897. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  898. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  899. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr>
  900. <tr><td>AL_INVALID_VALUE</td><td>The specified value pointer is not valid.</td></tr></table><br>
  901. There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.
  902. End Rem
  903. Global alGetBufferi( bid,param,value:Int Ptr )=P("alGetBufferi")
  904. Rem
  905. bbdoc: This Function retrieves a floating point property of a buffer.
  906. about:
  907. <table><tr><th>Parameters</th><th>Description</th></tr>
  908. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  909. <tr><td>pname</td><td>the name of the attribute To be retrieved</td></tr>
  910. <tr><td>value1, value2, value3</td><td>pointers To ALint values To hold the retrieved data</td></tr></table><br>
  911. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  912. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  913. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr>
  914. <tr><td>AL_INVALID_VALUE</td><td>The specified value pointer is not valid.</td></tr></table><br>
  915. There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this Function may be used by OpenAL extensions.
  916. End Rem
  917. Global alGetBuffer3i( bid,param,value1:Int Ptr,value2:Int Ptr,value3:Int Ptr )=P("alGetBuffer3i")
  918. Rem
  919. bbdoc: This Function retrieves a floating point property of a buffer. The relevant properties are listed in the table Buffer Properties.
  920. about:
  921. <table><tr><th>Parameters</th><th>Description</th></tr>
  922. <tr><td>bid</td><td>buffer name whose attribute is being retrieved</td></tr>
  923. <tr><td>pname</td><td>the name of the attribute To be retrieved</td></tr>
  924. <tr><td>values</td><td>pointer to an ALint vector To hold the retrieved data</td></tr></table><br>
  925. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  926. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  927. <tr><td>AL_INVALID_NAME</td><td>The specified buffer doesn't have parameters (the NULL buffer), or doesn't exist.</td></tr>
  928. <tr><td>AL_INVALID_VALUE</td><td>The specified value pointer is not valid.</td></tr></table><br>
  929. There are no relevant buffer properties defined in OpenAL 1.1 which can be retrieved by this call, but this function may be used by OpenAL extensions.
  930. End Rem
  931. Global alGetBufferiv( bid,param,values:Int Ptr )=P("alGetBufferiv")
  932. Rem
  933. bbdoc: This Function generates one or more sources. References To sources are ALuint values, which are used wherever a source reference is needed (in calls such as #alDeleteSources and #alSourcei).
  934. about:
  935. <table><tr><th>Parameters</th><th>Description</th></tr>
  936. <tr><td>n</td><td>the number of sources To be generated</td></tr>
  937. <tr><td>sources</td><td>pointer To an array of ALuint values which will store the names of the New sources</td></tr></table><br>
  938. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  939. <tr><td>AL_OUT_OF_MEMORY</td><td>There is not enough memory To generate all the requested sources.</td></tr>
  940. <tr><td>AL_INVALID_VALUE</td><td>There are not enough non-memory resources To create all the requested sources, or the array pointer is not valid.</td></tr>
  941. <tr><td>AL_INVALID_OPERATION</td><td>There is no context To create sources in.</td></tr></table><br>
  942. If the requested number of sources cannot be created, an error will be generated which can be detected with #alGetError. If an error occurs, no sources will be generated. If n equals zero, #alGenSources does nothing and does not Return an error.
  943. End Rem
  944. Global alGenSources( n,sources:Int Ptr )=P("alGenSources")
  945. Rem
  946. bbdoc: This function deletes one or more sources.
  947. about:
  948. <table><tr><th>Parameters</th><th>Description</th></tr>
  949. <tr><td>n</td><td>the number of sources to be deleted</td></tr>
  950. <tr><td>sources</td><td>pointer to an array of source names identifying the sources to be deleted</td></tr></table><br>
  951. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  952. <tr><td>AL_INVALID_NAME</td><td>at least one specified source is not valid, or an attempt is being made to delete more sources than exist.</td></tr>
  953. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  954. If the requested number of sources cannot be deleted, an error will be generated which can be detected with #alGetError. If an error occurs, no sources will be deleted. If n equals zero, #alDeleteSources does nothing and will not return an error.<p>
  955. A playing source can be deleted - the source will be stopped and then deleted.
  956. End Rem
  957. Global alDeleteSources( n,sources:Int Ptr )=P("alDeleteSources")
  958. Rem
  959. bbdoc: This function tests if a source name is valid, returning AL_TRUE if valid and AL_FALSE if not.
  960. about:
  961. <table><tr><th>Parameters</th><th>Description</th></tr>
  962. <tr><td>sid</td><td>a source name to be tested for validity</td></tr></table><br>
  963. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  964. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr>
  965. <tr><td></td><td></td></tr></table><br>
  966. End Rem
  967. Global alIsSource( sid )=P("alIsSource")
  968. Rem
  969. bbdoc: This function sets a floating point property of a source. The relevant properties are listed in the table Source Properties.
  970. about:
  971. <table><tr><th>Parameters</th><th>Description</th></tr>
  972. <tr><td>sid</td><td>source name whose attribute is being set</td></tr>
  973. <tr><td>param</td><td>the name of the attribute to set:<br>AL_PITCH<br>AL_GAIN<br>AL_MAX_DISTANCE<br>AL_ROLLOFF_FACTOR<br>AL_REFERENCE_DISTANCE<br>AL_MIN_GAIN<br>AL_MAX_GAIN<br>AL_CONE_OUTER_GAIN</td></tr>
  974. <tr><td>value</td><td>the value to set the attribute t</td></tr></table><br>
  975. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  976. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  977. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  978. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  979. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  980. End Rem
  981. Global alSourcef( sid,param,value# )=P("alSourcef")
  982. Rem
  983. bbdoc: This function sets a source property requiring three floating point values. The relevant properties are listed in the table Source Properties.
  984. about:
  985. <table><tr><th>Parameters</th><th>Description</th></tr>
  986. <tr><td>sid</td><td>source name whose attribute is being set</td></tr>
  987. <tr><td>param</td><td>the name of the attribute to set:<br>AL_POSITION<br>AL_VELOCITY<br>AL_DIRECTION</td></tr>
  988. <tr><td>v1, v2, v3</td><td>the three ALfloat values which the attribute will be set to</td></tr></table><br>
  989. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  990. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  991. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  992. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  993. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  994. This function is an alternative to alSourcefv.
  995. End Rem
  996. Global alSource3f( sid,param,value1#,value2#,value3# )=P("alSource3f")
  997. Rem
  998. bbdoc: This function sets a source property requiring three floating point values. The relevant properties are listed in the table Source Properties.
  999. about:
  1000. <table><tr><th>Parameters</th><th>Description</th></tr>
  1001. <tr><td>sid</td><td>source name whose attribute is being set</td></tr>
  1002. <tr><td>param</td><td>the name of the attribute to set:<br>AL_POSITION<br>AL_VELOCITY<br>AL_DIRECTION</td></tr>
  1003. <tr><td>values</td><td>a pointer to the vector to set the attribute to</td></tr></table><br>
  1004. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1005. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1006. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1007. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1008. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1009. This function is an alternative to alSource3f.
  1010. End Rem
  1011. Global alSourcefv( sid,param,values:Float Ptr )=P("alSourcefv")
  1012. Rem
  1013. bbdoc: This function sets an integer property of a source. The relevant properties are listed in the table Source Properties.
  1014. about:
  1015. <table><tr><th>Parameters</th><th>Description</th></tr>
  1016. <tr><td>sid</td><td>source name whose attribute is being set</td></tr>
  1017. <tr><td>param</td><td>the name of the attribute to set:<br>AL_SOURCE_RELATIVE<br>AL_CONE_INNER_ANGLE<br>AL_CONE_OUTER_ANGLE<br>AL_LOOPING<br>AL_BUFFER<br>AL_SOURCE_STATE</td></tr>
  1018. <tr><td>value</td><td>a pointer to the vector to set the attribute to</td></tr></table><br>
  1019. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1020. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1021. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1022. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1023. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1024. The buffer name zero is reserved as a "NULL Buffer" and is accepted by alSourcei(..., AL_BUFFER, ...) as a valid buffer of zero length. The NULL Buffer is extremely useful for detaching buffers from a source which were attached using this call or with alSourceQueueBuffers.
  1025. End Rem
  1026. Global alSourcei( sid,param,value )=P("alSourcei")
  1027. Rem
  1028. bbdoc: This function sets an integer property of a source. The relevant properties are listed in the table Source Properties.
  1029. about:
  1030. <table><tr><th>Parameters</th><th>Description</th></tr>
  1031. <tr><td>sid</td><td>source name whose attribute is being set</td></tr>
  1032. <tr><td>param</td><td>the name of the attribute to set:<br>AL_POSITION<br>AL_VELOCITY<br>AL_DIRECTION</td></tr>
  1033. <tr><td>value1, value2, value3</td><td>the values to set the attribute to</td></tr></table><br>
  1034. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1035. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1036. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1037. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1038. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1039. End Rem
  1040. Global alSource3i( sid,param,value1,value2,value3 )=P("alSource3i")
  1041. Rem
  1042. bbdoc: This function sets an integer property of a source. The relevant properties are listed in the table Source Properties.
  1043. about:
  1044. <table><tr><th>Parameters</th><th>Description</th></tr>
  1045. <tr><td>sid</td><td>source name whose attribute is being set</td></tr>
  1046. <tr><td>param</td><td>the name of the attribute to set:<br>AL_POSITION<br>AL_VELOCITY<br>AL_DIRECTION</td></tr>
  1047. <tr><td>values</td><td>the values to set the attribute to</td></tr></table><br>
  1048. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1049. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1050. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1051. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1052. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1053. End Rem
  1054. Global alSourceiv( sid,param,values:Int Ptr )=P("alSourceiv")
  1055. Rem
  1056. bbdoc: This function retrieves a floating point property of a source. The relevant properties are listed in the table Source Properties.
  1057. about:
  1058. <table><tr><th>Parameters</th><th>Description</th></tr>
  1059. <tr><td>sid</td><td>source name whose attribute is being retrieved</td></tr>
  1060. <tr><td>param</td><td>the name of the attribute to retrieve:<br>AL_PITCH<br>AL_GAIN<br>AL_MIN_GAIN<br>AL_MAX_GAIN<br>AL_MAX_DISTANCE<br>AL_ROLLOFF_FACTOR<br>AL_CONE_OUTER_GAIN<br>AL_CONE_INNER_ANGLE<br>AL_CONE_OUTER_ANGLE<br>AL_REFERENCE_DISTANCE</td></tr>
  1061. <tr><td>value</td><td>a pointer to the floating point value being retrieved</td></tr></table><br>
  1062. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1063. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1064. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1065. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1066. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1067. End Rem
  1068. Global alGetSourcef( sid,param,value:Float Ptr )=P("alGetSourcef")
  1069. Rem
  1070. bbdoc: This function retrieves three floating point values representing a property of a source. The relevant properties are listed in the table Source Properties.
  1071. about:
  1072. <table><tr><th>Parameters</th><th>Description</th></tr>
  1073. <tr><td>sid</td><td>source name whose attribute is being retrieved</td></tr>
  1074. <tr><td>param</td><td>the name of the attribute to retrieve:<br>AL_POSITION<br>AL_VELOCITY<br>AL_DIRECTION</td></tr>
  1075. <tr><td>value1,value2,value3</td><td>pointers to the values to retrieve</td></tr></table><br>
  1076. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1077. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1078. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1079. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1080. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1081. End Rem
  1082. Global alGetSource3f( sid,param,value1:Float Ptr,value2:Float Ptr,value3:Float Ptr )=P("alGetSource3f")
  1083. Rem
  1084. bbdoc: This function retrieves a floating point-vector property of a source. The relevant properties are listed in the table Source Properties.
  1085. about:
  1086. <table><tr><th>Parameters</th><th>Description</th></tr>
  1087. <tr><td>sid</td><td>source name whose attribute is being retrieved</td></tr>
  1088. <tr><td>param</td><td>the name of the attribute to retrieve:<br>AL_POSITION<br>AL_VELOCITY<br>AL_DIRECTION</td></tr>
  1089. <tr><td>values</td><td>a pointer to the vector to retrieve</td></tr></table><br>
  1090. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1091. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1092. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1093. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1094. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1095. End Rem
  1096. Global alGetSourcefv( sid,param,values:Float Ptr )=P("alGetSourcefv")
  1097. Rem
  1098. bbdoc: This function retrieves an integer property of a source. The relevant properties are listed in the table Source Properties.
  1099. about:
  1100. <table><tr><th>Parameters</th><th>Description</th></tr>
  1101. <tr><td>sid</td><td>source name whose attribute is being retrieved</td></tr>
  1102. <tr><td>pname</td><td>the name of the attribute to retrieve:<br>AL_SOURCE_RELATIVE<br>AL_BUFFER<br>AL_SOURCE_STATE<br>AL_BUFFERS_QUEUED<br>AL_BUFFERS_PROCESSED</td></tr>
  1103. <tr><td>value</td><td>a pointer to the integer value being retrieved</td></tr></table><br>
  1104. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1105. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1106. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1107. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1108. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1109. End Rem
  1110. Global alGetSourcei( sid,param,value:Int Ptr )=P("alGetSourcei")
  1111. Rem
  1112. bbdoc: This function retrieves an integer property of a source. The relevant properties are listed in the table Source Properties.
  1113. about:
  1114. <table><tr><th>Parameters</th><th>Description</th></tr>
  1115. <tr><td>sid</td><td>source name whose attribute is being retrieved</td></tr>
  1116. <tr><td>pname</td><td>the name of the attribute to retrieve:<br>AL_POSITION<br>AL_VELOCITY<br>AL_DIRECTION</td></tr>
  1117. <tr><td>value1, value2, value3</td><td>pointers to the integer values being retrieved</td></tr></table><br>
  1118. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1119. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1120. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1121. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1122. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1123. End Rem
  1124. Global alGetSource3i( sid,param,value1:Int Ptr,value2:Int Ptr,value3:Int Ptr )=P("alGetSource3i")
  1125. Rem
  1126. bbdoc: This function retrieves an integer property of a source. The relevant properties are listed in the table Source Properties.
  1127. about:
  1128. <table><tr><th>Parameters</th><th>Description</th></tr>
  1129. <tr><td>sid</td><td>source name whose attribute is being retrieved</td></tr>
  1130. <tr><td>pname</td><td>the name of the attribute to retrieve:<br>AL_POSITION<br>AL_VELOCITY<br>AL_DIRECTION</td></tr>
  1131. <tr><td>values</td><td>pointers to the integer values being retrieved</td></tr></table><br>
  1132. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1133. <tr><td>AL_INVALID_VALUE</td><td>The value given is out of range.</td></tr>
  1134. <tr><td>AL_INVALID_ENUM</td><td>The specified parameter is not valid.</td></tr>
  1135. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1136. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1137. End Rem
  1138. Global alGetSourceiv( sid,param,values:Int Ptr )=P("alGetSourceiv")
  1139. Rem
  1140. bbdoc: This function plays a set of sources.
  1141. about:
  1142. <table><tr><th>Parameters</th><th>Description</th></tr>
  1143. <tr><td>ns</td><td>the number of sources to be played</td></tr>
  1144. <tr><td>sids</td><td>a pointer to an array of sources to be played</td></tr></table><br>
  1145. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1146. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  1147. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1148. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1149. The playing sources will have their state changed to AL_PLAYING. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the AL_STOPPED state.
  1150. End Rem
  1151. Global alSourcePlayv( ns,sids:Int Ptr )=P("alSourcePlayv")
  1152. Rem
  1153. bbdoc: This function stops a set of sources.
  1154. about:
  1155. <table><tr><th>Parameters</th><th>Description</th></tr>
  1156. <tr><td>ns</td><td>the number of sources to stop</td></tr>
  1157. <tr><td>sids</td><td>a pointer to an array of sources to be stopped</td></tr></table><br>
  1158. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1159. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  1160. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1161. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1162. The stopped sources will have their state changed to AL_STOPPED.
  1163. End Rem
  1164. Global alSourceStopv( ns,sids:Int Ptr )=P("alSourceStopv")
  1165. Rem
  1166. bbdoc: This function stops a set of sources and sets all their states to AL_INITIAL.
  1167. about:
  1168. <table><tr><th>Parameters</th><th>Description</th></tr>
  1169. <tr><td>ns</td><td>the number of sources to be rewound</td></tr>
  1170. <tr><td>sids</td><td>a pointer to an array of sources to be rewound</td></tr></table><br>
  1171. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1172. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  1173. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1174. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1175. End Rem
  1176. Global alSourceRewindv( ns,sids:Int Ptr )=P("alSourceRewindv")
  1177. Rem
  1178. bbdoc: This function pauses a set of sources.
  1179. about:
  1180. <table><tr><th>Parameters</th><th>Description</th></tr>
  1181. <tr><td>ns</td><td>the number of sources to be paused</td></tr>
  1182. <tr><td>sids</td><td>a pointer to an array of sources to be paused</td></tr></table><br>
  1183. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1184. <tr><td>AL_INVALID_VALUE</td><td>The value pointer given is not valid.</td></tr>
  1185. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1186. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1187. The paused sources will have their state changed to AL_PAUSED.
  1188. End Rem
  1189. Global alSourcePausev( ns,sids:Int Ptr )=P("alSourcePausev")
  1190. Rem
  1191. bbdoc: This function plays a source.
  1192. about:
  1193. <table><tr><th>Parameters</th><th>Description</th></tr>
  1194. <tr><td>sid</td><td>the name of the source to be played</td></tr></table><br>
  1195. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1196. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1197. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1198. The playing source will have its state changed to AL_PLAYING. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the AL_STOPPED state.
  1199. End Rem
  1200. Global alSourcePlay( sid )=P("alSourcePlay")
  1201. Rem
  1202. bbdoc: This function stops a source.
  1203. about:
  1204. <table><tr><th>Parameters</th><th>Description</th></tr>
  1205. <tr><td>sid</td><td>the name of the source to be stopped</td></tr></table><br>
  1206. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1207. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1208. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1209. The stopped source will have its state changed to AL_STOPPED.
  1210. End Rem
  1211. Global alSourceStop( sid )=P("alSourceStop")
  1212. Rem
  1213. bbdoc: This function stops the source and sets its state to AL_INITIAL.
  1214. about:
  1215. <table><tr><th>Parameters</th><th>Description</th></tr>
  1216. <tr><td>sid</td><td>the name of the source to be rewound</td></tr></table><br>
  1217. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1218. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1219. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1220. End Rem
  1221. Global alSourceRewind( sid )=P("alSourceRewind")
  1222. Rem
  1223. bbdoc: This function pauses a source.
  1224. about:
  1225. <table><tr><th>Parameters</th><th>Description</th></tr>
  1226. <tr><td>sid</td><td>the name of the source to be paused</td></tr></table><br>
  1227. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1228. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1229. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1230. The paused source will have its state changed to AL_PAUSED.
  1231. End Rem
  1232. Global alSourcePause( sid )=P("alSourcePause")
  1233. Rem
  1234. bbdoc: This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using an #alSourcei call to retrieve AL_BUFFERS_PROCESSED.
  1235. about:
  1236. <table><tr><th>Parameters</th><th>Description</th></tr>
  1237. <tr><td>sid</td><td>the name of the source to queue buffers onto</td></tr>
  1238. <tr><td>numEntries</td><td>the number of buffers to be queued</td></tr>
  1239. <tr><td>bids</td><td>a pointer to an array of buffer names to be queued</td></tr></table><br>
  1240. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1241. <tr><td>AL_INVALID_NAME</td><td>at least one specified buffer name is not valid, or the specified source name is not valid.</td></tr>
  1242. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context, an attempt was made to add a new buffer which is not the same format as the buffers already in the queue, or the source already has a static buffer attached.</td></tr></table><br>
  1243. When first created, a source will be of type AL_UNDETERMINED. A successful #alSourceQueueBuffers call will change the source type to AL_STREAMING.
  1244. End Rem
  1245. Global alSourceQueueBuffers( sid,numEntries,bids:Int Ptr )=P("alSourceQueueBuffers")
  1246. Rem
  1247. bbdoc: This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using an #alSourcei call to retrieve AL_BUFFERS_PROCESSED, which is the maximum number of buffers that can be unqueued using this call.
  1248. about:
  1249. <table><tr><th>Parameters</th><th>Description</th></tr>
  1250. <tr><td>sid</td><td>the name of the source to unqueue buffers from</td></tr>
  1251. <tr><td>numEntries</td><td>the number of buffers to be unqueued</td></tr>
  1252. <tr><td>bids</td><td>a pointer to an array of buffer names that were removed</td></tr></table><br>
  1253. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1254. <tr><td>AL_INVALID_VALUE</td><td>at least one buffer can not be unqueued because it has not been processed yet.</td></tr>
  1255. <tr><td>AL_INVALID_NAME</td><td>The specified source name is not valid.</td></tr>
  1256. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1257. The unqueue operation will only take place if all n buffers can be removed from the queue.
  1258. End Rem
  1259. Global alSourceUnqueueBuffers( sid,numEntries,bids:Int Ptr )=P("alSourceUnqueueBuffers")
  1260. Rem
  1261. bbdoc: This function selects the OpenAL Doppler factor value.
  1262. about:
  1263. <table><tr><th>Parameters</th><th>Description</th></tr>
  1264. <tr><td>value</td><td>the Doppler scale value to set</td></tr></table><br>
  1265. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1266. <tr><td>AL_INVALID_VALUE</td><td>The specified value is not valid.</td></tr>
  1267. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1268. The default Doppler factor value is 1.0.
  1269. End Rem
  1270. Global alDopplerFactor( value# )=P("alDopplerFactor")
  1271. Rem
  1272. bbdoc: This function selects the speed of sound for use in Doppler calculations.
  1273. about:
  1274. <table><tr><th>Parameters</th><th>Description</th></tr>
  1275. <tr><td>value</td><td>the speed of sound value to set</td></tr></table><br>
  1276. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1277. <tr><td>AL_INVALID_VALUE</td><td>The specified value is not valid.</td></tr>
  1278. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1279. The default speed of sound value is 343.3.
  1280. End Rem
  1281. Global alDopplerVelocity( value# )=P("alDopplerVelocity")
  1282. Rem
  1283. bbdoc: This function selects the speed of sound for use in Doppler calculations.
  1284. about:
  1285. <table><tr><th>Parameters</th><th>Description</th></tr>
  1286. <tr><td>value#</td><td>the speed of sound value to set</td></tr></table><br>
  1287. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1288. <tr><td>AL_INVALID_VALUE</td><td>The specified value is not valid.</td></tr>
  1289. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1290. The default speed of sound value is 343.3.
  1291. End Rem
  1292. Global alSpeedOfSound( value# )=P("alSpeedOfSound")
  1293. Rem
  1294. bbdoc:This function selects the OpenAL distance model.<br><br>The AL_INVERSE_DISTANCE model works according to the following formula:<br><br>G_dB = AL_GAIN - 20log10(1 + AL_ROLLOFF_FACTOR*(distance - AL_REFERENCE_DISTANCE)/AL_REFERENCE_DISTANCE));<br>G_dB = min(G_dB, AL_MAX_GAIN);<br>G_dB = max(G_dB, AL_MIN_GAIN);<br><br>The AL_INVERSE_DISTANCE_CLAMPED model works according to the following formula:<br><br>distance = max(distance, AL_REFERENCE_DISTANCE);<br>distance = min(distance, AL_MAX_DISTANCE);<br>G_dB = AL_GAIN - 20log10(1 + AL_ROLLOFF_FACTOR*(distance - AL_REFERENCE_DISTANCE)/AL_REFERENCE_DISTANCE));<br>G_dB = min(G_dB, AL_MAX_GAIN);<br>G_dB = max(G_dB, AL_MIN_GAIN);<br><br>The AL_NONE model works according to the following formula:<br><br>G_db = AL_GAIN;<br>
  1295. about:
  1296. <table><tr><th>Parameters</th><th>Description</th></tr>
  1297. <tr><td>distanceModel</td><td>the distance model to be set:<br>AL_NONE<br>AL_INVERSE_DISTANCE<br>AL_INVERSE_DISTANCE_CLAMPED</td></tr></table><br>
  1298. <table><tr><th>Possible Error States</th><th>Description</th></tr>
  1299. <tr><td>AL_INVALID_VALUE</td><td>The specified distance model is not valid.</td></tr>
  1300. <tr><td>AL_INVALID_OPERATION</td><td>There is no current context.</td></tr></table><br>
  1301. The default distance model in OpenAL is AL_INVERSE_DISTANCE_CLAMPED.
  1302. End Rem
  1303. Global alDistanceModel( distanceModel )=P("alDistanceModel")