X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-CD.html-inc;h=b44c285d0bf730a03f45328043b789bc52f5f62b;hb=a3de848879a5553418ed11fb193c4bf286ca7120;hp=6fe8c4e9165c82d14b961a4a3696cb55f5ed9931;hpb=46beffd8f76fe150d946bf61c780e61de2affbdf;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-CD.html-inc b/pages/SDL-CD.html-inc index 6fe8c4e..b44c285 100644 --- a/pages/SDL-CD.html-inc +++ b/pages/SDL-CD.html-inc @@ -5,43 +5,26 @@
The constants are exported by default. You can avoid this by doing:
+use SDL::CD (); + ++
and access them directly:
+SDL::CD::CD_TRAYEMPTY; + ++
or by choosing the export tags below:
+Export tag: ':status'
+CD_TRAYEMPTY + CD_STOPPED + CD_PLAYING + CD_PAUSED + CD_ERROR + ++
Export tag: ':defaults'
+CD_FPS + SDL_MAX_TRACKS@@ -86,12 +93,12 @@
my $CD = SDL::CD->new( $drive ) +new
++my $CD = SDL::CD->new($drive)-Makes a new SDL::CD object. Returns NULL if the drive is busy or inaccessible.
+Makes a new SDL::CD object. Returns
undef
if the drive is busy or inaccessible.status
@@ -100,20 +107,14 @@
Returns the current status of the CD tray
- -Returns on of the following constants:
+Plays the given SDL::CD starting at track $start_track, for $ntracks tracks.
-$start_frame is the frame offset, from the beginning of the $start_track, at which to start. $nframes is the frame offset, from the beginning of the last track ($start_track+$ntracks), at which to end playing.
-play_tracks() should only be called after calling SDL_CDStatus to get track information about the CD use $CD->status().
+$start_frame is the frame offset, from the beginning of the $start_track, at which to start. $nframes is the frame offset, from the +beginning of the last track ($start_track+$ntracks), at which to end playing.
+play_tracks() should only be called after calling status to get information about the CD.
Note: Data tracks are ignored.
- -0, or -1 if there was an error.
+Returns 0
, or -1
if there was an error.
$CD->play($start, $length ); +$CD->play($start, $length);Plays the given SDL::CD , starting a frame $start for $length frames.
- -
0 on success, -1 on error
+Returns 0
on success, -1
on error
Pauses play on CD
- - -Returns 0 on success, or -1 on an error.
+Returns 0
on success, or -1
on an error.
$CD->resume();- - -
Returns 0 on success, or -1 on an error.
+Returns 0
on success, or -1
on an error.
Stops play on the CD.
- - -Returns 0 on success, or -1 on an error.
+Returns 0
on success, or -1
on an error.
Ejects the CD.
- - -Returns 0 on success, or -1 on an error.
+Returns 0
on success, or -1
on an error.
my $track = $CD->track($number);-
Retrives track description of track $number in CD. See SDL::CDTrack.
+Retrives track description of track $number in CD. See SDL::CDTrack.
+ +my ($min, $sec, $fra) = FRAMES_TO_MSF($frames); ++
Conversion functions from frames to Minute/Second/Frames
+my $frames = MSF_TO_FRAMES($min, $sec, $fra); +
See AUTHORS in SDL.