updated docs
[sdlgit/SDL-Site.git] / pages / SDL-Audio.html-inc
index 7127cec..b8c5b8f 100644 (file)
@@ -4,6 +4,7 @@
 
 <ul><li><a href="#NAME">NAME</a></li>
 <li><a href="#CATEGORY">CATEGORY</a></li>
+<li><a href="#CONSTANTS">CONSTANTS</a></li>
 <li><a href="#METHODS">METHODS</a>
 <ul><li><a href="#open">open</a></li>
 <li><a href="#pause">pause</a></li>
 <li><a href="#mix">mix</a></li>
 <li><a href="#lock">lock</a></li>
 <li><a href="#unlock">unlock</a></li>
-<li><a href="#close">close </a>
-</li>
+<li><a href="#close">close </a></li>
 </ul>
 </li>
+<li><a href="#AUTHORS">AUTHORS</a>
+</li>
 </ul><hr />
 <!-- INDEX END -->
 
 <p>Core, Audio</p>
 
 </div>
+<h1 id="CONSTANTS">CONSTANTS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="CONSTANTS_CONTENT">
+<p>The constants are exported by default. You can avoid this by doing:</p>
+<pre> use SDL::Audio ();
+
+</pre>
+<p>and access them directly:</p>
+<pre> SDL::Audio::AUDIO_S16SYS;
+
+</pre>
+<p>or by choosing the export tags below:</p>
+<p>Export tag: ':format'</p>
+<pre> AUDIO_U8
+ AUDIO_S8
+ AUDIO_U16LSB
+ AUDIO_S16LSB
+ AUDIO_U16MSB
+ AUDIO_S16MSB
+ AUDIO_U16
+ AUDIO_S16 
+ AUDIO_U16SYS
+ AUDIO_S16SYS
+
+</pre>
+<p>Export tag: ':status'</p>
+<pre> SDL_AUDIO_STOPPED
+ SDL_AUDIO_PLAYING
+ SDL_AUDIO_PAUSED
+
+</pre>
+
+</div>
 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
 <div id="METHODS_CONTENT">
 
@@ -64,7 +98,7 @@
 
 </pre>
        </dd>
-       <dt>The desired audio format. See <a href="/SDL-AudioSpec.html">SDL::AudioSpec</a></dt>
+       <dt>The desired audio format. See <a href="SDL-AudioSpec.html">SDL::AudioSpec</a></dt>
        <dd>
 <pre>    $desired-&gt;format
 
        </dd>
 </dl>
 <p>SDL::Audio::open reads these fields from the desired SDL::AudioSpec structure passed to the function and attempts to find an audio configuration matching your desired. As mentioned above, if the obtained parameter is NULL then SDL with convert from your desired audio settings to the hardware settings as it plays.</p>
-<p>If obtained is NULL then the desired SDL::AudioSpec is your working specification, otherwise the obtained SDL::AudioSpec becomes the working specification and the desired specification can be deleted. The data in the working specification is used when building <a href="/SDL-AudioCVT.html">SDL::AudioCVT</a>'s for converting loaded data to the hardware format.</p>
+<p>If obtained is NULL then the desired SDL::AudioSpec is your working specification, otherwise the obtained SDL::AudioSpec becomes the working specification and the desired specification can be deleted. The data in the working specification is used when building <a href="SDL-AudioCVT.html">SDL::AudioCVT</a>'s for converting loaded data to the hardware format.</p>
 <p>SDL::Audio::open calculates the size and silence fields for both the $desired and $obtained specifications. The size field stores the total size of the audio buffer in bytes, while the silence stores the value used to represent silence in the audio buffer</p>
 <p>The audio device starts out playing silence when it's opened, and should be enabled for playing by calling SDL::Audio::pause(0) when you are ready for your audio callback function to be called. Since the audio driver may modify the requested size of the audio buffer, you should allocate any local mixing buffers after you open the audio device. </p>
 
@@ -293,4 +327,9 @@ function is not running. Do not call this from the callback function or you will
 <p>Shuts down audio processing and closes the audio device.  </p>
 
 </div>
+<h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHORS_CONTENT">
+<p>See <b>AUTHORS</b> in <cite>SDL</cite>.</p>
+
+</div>
 </div>
\ No newline at end of file