updated docs
[sdlgit/SDL-Site.git] / pages / SDL-CDTrack.html-inc
1 <div class="pod">
2 <!-- INDEX START -->
3 <h3 id="TOP">Index</h3>
4
5 <ul><li><a href="#NAME">NAME</a></li>
6 <li><a href="#CATEGORY">CATEGORY</a></li>
7 <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
8 <li><a href="#CONSTANTS">CONSTANTS</a></li>
9 <li><a href="#METHOD">METHOD</a>
10 <ul><li><a href="#id">id</a></li>
11 <li><a href="#type">type</a></li>
12 <li><a href="#length">length</a></li>
13 <li><a href="#offset">offset </a></li>
14 </ul>
15 </li>
16 <li><a href="#SEE_ALSO">SEE ALSO</a></li>
17 <li><a href="#AUTHORS">AUTHORS</a>
18 </li>
19 </ul><hr />
20 <!-- INDEX END -->
21
22 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
23 <div id="NAME_CONTENT">
24 <p>SDL::CDTrack -- SDL Bindings for structure SDL_CDTrack</p>
25
26 </div>
27 <h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
28 <div id="CATEGORY_CONTENT">
29 <p>Core, CDROM, Structure</p>
30
31 </div>
32 <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
33 <div id="SYNOPSIS_CONTENT">
34 <pre> use SDL;
35  use SDL::CDROM;
36  use SDL::CD ':status';
37  use SDL::CDTrack;
38
39  SDL::init( SDL_INIT_CDROM );
40
41  my $drives = SDL::CDROM::num_drives(); 
42
43  if( $drives &gt; 0 )
44  {
45      my $CD = SDL::CD-&gt;new(0); #first drive's CD
46
47      if($CD)
48      {
49          if( $CD-&gt;status != CD_TRAYEMPTY )
50          {
51              my $track = SDL::CD-&gt;track(0);
52          }
53      }
54  }
55
56 </pre>
57
58 </div>
59 <h1 id="CONSTANTS">CONSTANTS</h1><p><a href="#TOP" class="toplink">Top</a></p>
60 <div id="CONSTANTS_CONTENT">
61 <p>The constants are exported by default. You can avoid this by doing:</p>
62 <pre> use SDL::CDTrack ();
63
64 </pre>
65 <p>and access them directly:</p>
66 <pre> SDL::CDTrack::SDL_AUDIO_TRACK;
67
68 </pre>
69 <p>or by choosing the export tags below:</p>
70 <p>Export tag: ':type'</p>
71 <pre> SDL_AUDIO_TRACK
72  SDL_DATA_TRACK
73
74 </pre>
75
76 </div>
77 <h1 id="METHOD">METHOD</h1><p><a href="#TOP" class="toplink">Top</a></p>
78 <div id="METHOD_CONTENT">
79
80 </div>
81 <h2 id="id">id</h2>
82 <div id="id_CONTENT">
83 <pre> $track-&gt;id() # 0-99 
84
85 </pre>
86 <p>Track number</p>
87
88 </div>
89 <h2 id="type">type</h2>
90 <div id="type_CONTENT">
91 <pre> $track-&gt;type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK 
92
93 </pre>
94 <p>Type of track</p>
95
96 </div>
97 <h2 id="length">length</h2>
98 <div id="length_CONTENT">
99 <pre> $track-&gt;length() 
100
101 </pre>
102 <p>Length, in frames, of this track </p>
103
104 </div>
105 <h2 id="offset">offset </h2>
106 <div id="offset_CONTENT">
107 <pre> $track-&gt;offset()
108
109 </pre>
110 <p>Frame offset to the beginning of this track </p>
111
112 </div>
113 <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
114 <div id="SEE_ALSO_CONTENT">
115 <p><a href="SDL-CDROM.html">SDL::CDROM</a>, <a href="SDL-CD.html">SDL::CD</a></p>
116
117 </div>
118 <h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
119 <div id="AUTHORS_CONTENT">
120 <p>See <b>AUTHORS</b> in <cite>SDL</cite>.</p>
121
122 </div>
123 </div>