fixed docs for callbacks
[sdlgit/SDL-Site.git] / pages / SDL-AudioSpec.html-inc
index 61a5757..ca1efb1 100644 (file)
@@ -10,7 +10,8 @@
 <ul><li><a href="#freq">freq</a></li>
 <li><a href="#format">format</a></li>
 <li><a href="#channels">channels</a></li>
-<li><a href="#samples">samples</a>
+<li><a href="#samples">samples</a></li>
+<li><a href="#callback">callback</a>
 </li>
 </ul>
 </li>
 
  my $audio_spec = SDL::AudioSpec-&gt;new();
 
-    $audio_spec-&gt;freq(22050);          # 22050Hz - FM Radio quality
-    $audio_spec-&gt;format(AUDIO_S16SYS); # 16-bit signed audio
-    $audio_spec-&gt;samples(8192);        # Large audio buffer reduces risk of dropouts but increases response time
-    $audio_spec-&gt;channels(1);          # Mono
+     $audio_spec-&gt;freq(22050);          # 22050Hz - FM Radio quality
+     $audio_spec-&gt;format(AUDIO_S16SYS); # 16-bit signed audio
+     $audio_spec-&gt;samples(8192);        # Large audio buffer reduces risk of dropouts but increases response time
+     $audio_spec-&gt;channels(1);          # Mono
+     $audio_spec-&gt;callback('main::callback');
+
+ sub callback
+ {
+     # do something here
+ }
 
 </pre>
 
@@ -112,4 +119,9 @@ size specified in format multiplied by the number of channels. When the <code>SD
 set to 4096.</p>
 
 </div>
+<h2 id="callback">callback</h2>
+<div id="callback_CONTENT">
+<p>To be documented.</p>
+
+</div>
 </div>
\ No newline at end of file