chp-introduction.sgml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <chapter id="introduction">
  2. <title>Introduction</title>
  3. <![ %Revision [
  4. <para><literallayout>
  5. CVS Document: $Id: chp-introduction.sgml,v 1.3 2000/11/10 21:23:52 bk Exp $
  6. CVS Revision: $Revision: 1.3 $
  7. $Log: chp-introduction.sgml,v $
  8. Revision 1.3 2000/11/10 21:23:52 bk
  9. Use ../CREDITS for list of contributors.
  10. Revision 1.2 2000/10/26 02:58:55 bk
  11. Cleanup (typos).
  12. Revision 1.1 2000/10/11 18:44:46 bk
  13. Document split into separate files. Minor fixes.
  14. </literallayout><para>
  15. ]]>
  16. <section>
  17. <title>Formatting and Conventions</title>
  18. <para>
  19. This API Specification and Reference uses a style that is a blend of the
  20. OpenGL v1.2 specification and the OpenGL Programming Guide, 2nd ed.
  21. Conventions: 'T' is used to designate a type for those functions which
  22. exist in multiple signatures for different types. 'Object' is used
  23. to designate a target Object for those functions which exist in multiple
  24. versions for different Object categories. The 'al' and 'AL_' prefix
  25. is omitted throughout the document.
  26. </para>
  27. <![ %Annote [
  28. <note><title>Annotation (Terminology)</title><para>
  29. "State" refers to state within the context of the &OAL;
  30. state machine description of the &OAL; implementation.
  31. "Objects" refer to &OAL; primitives.
  32. "Attribute" refers to attributes of &OAL; Objects.
  33. Attributes of a &OAL; Objects are one part of the
  34. &OAL; state. Some attributes are not specific to
  35. single objects, but apply to the entire context.
  36. "Parameter" is used for function arguments that might
  37. or might not be attributes, in particular for
  38. command arguments that are not stored as state.
  39. The use of "Property" is to be avoided.
  40. </para></note>
  41. ]]>
  42. <para>
  43. <revhistory>
  44. <revision>
  45. <revnumber> 1.8/1.7./1.6/1.5 </revnumber>
  46. <date> September-August 2000 </date>
  47. <authorinitials> bk </authorinitials>
  48. <revremark> Final Draft for Public Review </revremark>
  49. </revision>
  50. <revision>
  51. <revnumber> 1.4 </revnumber>
  52. <date> June 2000 </date>
  53. <authorinitials> bk </authorinitials>
  54. <revremark> First Draft for Public Review </revremark>
  55. </revision>
  56. <revision>
  57. <revnumber> 1.2 </revnumber>
  58. <date> March 2000 </date>
  59. <authorinitials> mkv </authorinitials>
  60. <revremark> Draft released for GDC </revremark>
  61. </revision>
  62. </revhistory>
  63. </para>
  64. <![ %Scratch [
  65. <note id="todo"><title>TODO</title><para>
  66. <literallayout>
  67. - work thru past changes
  68. - add GH section
  69. - add rewrite of GH section
  70. - add section on rfc/ann id's
  71. - add section on procedure
  72. - add proper id's to rfc/ann/sections etc.
  73. </literallayout>
  74. </para></note>
  75. ]]>
  76. </section>
  77. <section>
  78. <title>What is the &OAL; Audio System?</title>
  79. <para>
  80. &OAL; (for "Open Audio Library") is a software interface to audio hardware.
  81. The interface consists of a number of functions that allow a programmer
  82. to specify the objects and operations in producing high-quality audio
  83. output, specifically multichannel output of 3D arrangements of sound
  84. sources around a listener.
  85. </para>
  86. <para>
  87. The &OAL; API is designed to be cross-platform and easy to use.
  88. It resembles the &OGL; API in coding style and conventions. &OAL; uses a
  89. syntax resembling that of &OGL; where applicable.
  90. </para>
  91. <para>
  92. &OAL; is foremost a means to generate audio in a simulated three-dimensional
  93. space. Consequently, legacy audio concepts such as panning and left/right
  94. channels are not directly supported. &OAL; does include extensions compatible
  95. with the IA-SIG 3D Level 1 and Level 2 rendering guidelines to handle
  96. sound-source directivity and distance-related attenuation and Doppler effects,
  97. as well as environmental effects such as reflection, obstruction, transmission,
  98. reverberation.
  99. </para>
  100. <para>
  101. Like &OGL;, the &OAL; core API has no notion of an explicit rendering context,
  102. and operates on an implied current &OAL; Context. Unlike the &OGL;
  103. specification the &OAL; specification includes both the core API (the
  104. actual &OAL; API) and the operating system bindings
  105. of the ALC API (the "Audio Library Context"). Unlike &OGL;'s GLX, WGL
  106. and other OS-specific bindings, the ALC API is portable across platforms
  107. as well.
  108. </para>
  109. </section>
  110. <section>
  111. <title>Programmer's View of &OAL;</title>
  112. <para>
  113. To the programmer, &OAL; is a set of commands that allow the
  114. specification of sound sources and a listener in three
  115. dimensions, combined with commands that control how these
  116. sound sources are rendered into the output buffer. The
  117. effect of &OAL; commands is not guaranteed to be immediate,
  118. as there are latencies depending on the implementation,
  119. but ideally such latency should not be noticeable to the
  120. user.
  121. </para>
  122. <para>
  123. A typical program that uses &OAL; begins with calls to
  124. open a sound device which is used to process output and
  125. play it on attached hardware (e.g. speakers or headphones).
  126. Then, calls are made to allocate an AL context and
  127. associate it with the device. Once an AL context is
  128. allocated, the programmer is free to issue AL commands.
  129. Some calls are used to render Sources (point and directional
  130. Sources, looping or not), while others affect the rendering
  131. of these Sources including how they are attenuated by
  132. distance and relative orientation.
  133. </para>
  134. <![ %Annote [
  135. <note><title>Annotation (&OAL; and &OGL; use)</title><para>
  136. Often, &OAL; will be used to render a 3D audio environment
  137. matched by a 3D visual scenery. For this purpose, &OAL; is
  138. meant to be a seamlessly integrating complement to &OGL;.
  139. &OAL; state can be updated in sync with the &OGL; or video
  140. updates (synchronized), or in timesteps independent of the
  141. graphics framerate. Audio rendering loops usually update
  142. the current locations of the sources and the listener, updates
  143. global settings, and manages buffers.
  144. </para></note>
  145. ]]>
  146. </section>
  147. <section>
  148. <title>Implementor's View of &OAL;</title>
  149. <para>
  150. To the implementor, &OAL; is a set of commands that affect
  151. the operation of CPU and sound hardware. If the hardware
  152. consists only of an addressable output buffer, then &OAL; must
  153. be implemented almost entirely on the host CPU. In some cases
  154. audio hardware provides DSP-based and other acceleration in
  155. various degress. The &OAL; implementors task is to provide
  156. the CPU software interface while dividing the work for each
  157. AL command between the CPU and the audio hardware. This
  158. division should be tailored to the available audio hardware
  159. to obtain optimum performance in carrying out AL calls.
  160. </para>
  161. <para>
  162. &OAL; maintains a considerable amount of state information.
  163. This state controls how the Sources are rendered into the
  164. output buffer. Some of this state is directly available to
  165. the user: he or she can make calls to obtain its value.
  166. Some of it, however, is visible only by the effect it has
  167. on what is rendered. One of the main goals of this
  168. specification is to make &OAL; state information explicit,
  169. to eludicate how it changes, and to indicate what its
  170. effects are.
  171. </para>
  172. <![ %Annote [
  173. <note><title>Annotation (Native audio APIs)</title><para>
  174. Implementors can choose to implement &OAL; on top
  175. of an existing native audio API.
  176. </para></note>
  177. ]]>
  178. </section>
  179. <section>
  180. <title>Our View</title>
  181. <para>
  182. We view &OAL; as a state machine that controls a multichannel
  183. processing system to synthesize a digital stream, passing sample
  184. data through a chain of parametrized digital audio signal
  185. processing operations. This model should engender a specification
  186. that satisfies the needs of both programmers and implementors.
  187. It does not, however, necessarily
  188. provide a model for implementation. Any conformant implementation
  189. must produce results conforming to those produced by the specified
  190. methods, but there may be ways to carry out a particular computation
  191. that are more efficient than the one specified.
  192. </para>
  193. </section>
  194. <section>
  195. <title>Requirements, Conformance and Extensions</title>
  196. <para>
  197. The specification has to guarantee a minimum number of resources.
  198. However, implementations are encouraged to compete on performance,
  199. available resources, and output quality.
  200. </para>
  201. <![ %RFC [
  202. <note id="rfc-bk000724-06"><title>RFC: suggested requirements</title><para>
  203. These have been taken from earlier specs drafts, suggested by
  204. Creative:
  205. A minimum of sixteen (16) Sources per Context should always be available.
  206. The number and size of Buffers available is limited only by the amount
  207. of memory available and/or accessible by the implementation.
  208. The specification could also list requirements by the implementation:
  209. A minimum storage space of half a megabyte (512kB) should always be available.
  210. </para></note>
  211. ]]>
  212. <![ %RFC [
  213. <note id="rfc-briareos000724-01"><title>RFC: no requirements</title><para>
  214. I3DL1-like requirements might be so arbitrary that they are useless.
  215. The dangers here are cap bits, and a subtle aliasing of source and
  216. hardware buffers. AL implementations should implement as much quality
  217. and performance as possible for any given number of sources/
  218. Application request resources when creating a context and can use Hints
  219. to indicate desired trade-offs.
  220. </para></note>
  221. ]]>
  222. <para>
  223. There will be an &OAL; set of conformance tests available along
  224. with the open source sample implementation. Vendors and individuals
  225. are encouraged to specify and implement extensions to &OAL; in
  226. the same way &OGL; is extensible. Successful extensions will
  227. become part of the core specification as necessary and desirable.
  228. &OAL; implementations have to guarantee backwards compatibility
  229. and ABI compatibility for minor revisions.
  230. </para>
  231. <para>
  232. The current sample implementation and documentation for &OAL; can be
  233. obtained from
  234. <ulink
  235. url="http://wwww.openal.org/"
  236. type="http">openal.org</ulink>.
  237. &OAL; is also available from the the
  238. <ulink url="http://cvs.lokigames.com/cgi-bin/cvsweb.cgi/openal/" type="http">
  239. &OAL; CVS repository</ulink>. For more information on how to get
  240. &OAL; from CVS also see <ulink url="http://cvs.lokigames.com/" type="http">
  241. &coLoki; CVS</ulink>.
  242. </para>
  243. </section>
  244. <section>
  245. <title>Architecture Review and Acknowledgements</title>
  246. <para>
  247. Like &OGL;, &OAL; is meant to evolve through a joined effort of
  248. implementators and application programmers meeting in regular
  249. sessions of an Architecture Review Board (ARB). As of this time
  250. the ARB has not yet been set up. Currently, the two companies
  251. committed to implementing &OAL; drivers have appointed two
  252. contacts responsible for preparing the specification draft.
  253. </para>
  254. <para>
  255. Consequently &OAL; is a cooperative effort, one in a sequence of
  256. earlier attempts to create a cross-platform audio API. The current
  257. authors/editors have assembled this draft of the specification,
  258. but many have, directly and indirectly, contributed to the content
  259. of the actual document. The following list (in all likelihood
  260. incomplete) gives in alphabetical order participants in the discussion
  261. and contributors to the specification processs and related efforts:
  262. &CREDITS;
  263. </para>
  264. </section>
  265. </chapter> <!-- Overview -->