updated docs
[sdlgit/SDL-Site.git] / pages / SDL-CDTrack.html-inc
index 28a7b13..87cd3ec 100644 (file)
@@ -3,7 +3,18 @@
 <h3 id="TOP">Index</h3>
 
 <ul><li><a href="#NAME">NAME</a></li>
-<li><a href="#CATEGORY">CATEGORY</a>
+<li><a href="#CATEGORY">CATEGORY</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#CONSTANTS">CONSTANTS</a></li>
+<li><a href="#METHOD">METHOD</a>
+<ul><li><a href="#id">id</a></li>
+<li><a href="#type">type</a></li>
+<li><a href="#length">length</a></li>
+<li><a href="#offset">offset </a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a></li>
+<li><a href="#AUTHORS">AUTHORS</a>
 </li>
 </ul><hr />
 <!-- INDEX END -->
 </div>
 <h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
 <div id="CATEGORY_CONTENT">
-<p>TODO, Core, CDROM, Structure</p>
+<p>Core, CDROM, Structure</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre> use SDL;
+ use SDL::CDROM;
+ use SDL::CD ':status';
+ use SDL::CDTrack;
+
+ SDL::init( SDL_INIT_CDROM );
+
+ my $drives = SDL::CDROM::num_drives(); 
+
+ if( $drives &gt; 0 )
+ {
+     my $CD = SDL::CD-&gt;new(0); #first drive's CD
+
+     if($CD)
+     {
+         if( $CD-&gt;status != CD_TRAYEMPTY )
+         {
+             my $track = SDL::CD-&gt;track(0);
+         }
+     }
+ }
+
+</pre>
+
+</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::CDTrack ();
+
+</pre>
+<p>and access them directly:</p>
+<pre> SDL::CDTrack::SDL_AUDIO_TRACK;
+
+</pre>
+<p>or by choosing the export tags below:</p>
+<p>Export tag: ':type'</p>
+<pre> SDL_AUDIO_TRACK
+ SDL_DATA_TRACK
+
+</pre>
+
+</div>
+<h1 id="METHOD">METHOD</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHOD_CONTENT">
+
+</div>
+<h2 id="id">id</h2>
+<div id="id_CONTENT">
+<pre> $track-&gt;id() # 0-99 
+
+</pre>
+<p>Track number</p>
+
+</div>
+<h2 id="type">type</h2>
+<div id="type_CONTENT">
+<pre> $track-&gt;type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK 
+
+</pre>
+<p>Type of track</p>
+
+</div>
+<h2 id="length">length</h2>
+<div id="length_CONTENT">
+<pre> $track-&gt;length() 
+
+</pre>
+<p>Length, in frames, of this track </p>
+
+</div>
+<h2 id="offset">offset </h2>
+<div id="offset_CONTENT">
+<pre> $track-&gt;offset()
+
+</pre>
+<p>Frame offset to the beginning of this track </p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><a href="SDL-CDROM.html">SDL::CDROM</a>, <a href="SDL-CD.html">SDL::CD</a></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