Index


NAME

Top

SDL::Cdrom - a SDL perl extension for managing CD-ROM drives

SYNOPSIS

Top

	use SDL::Cdrom;
	$cdrom = SDL::Cdrom->new(0);
	$cdrom->play();

EXPORTS

Top

DESCRIPTION

Top

Create a new SDL::Cdrom object. The passed $id is the number of the drive, whereas 0 is the first drive etc.

	use SDL::Cdrom;
	my $drive => SDL::Cdrom->new($id);

METHODS

Top

cd_num_drives()

Returns the number of CD-ROM drives present.

name(cd)

Returns the system dependent name of the CD-ROM device. It takes a SDL::Cdrom as first parameter.

status(cd)

Return the status of the drive. It takes a SDL::Cdrom as first parameter.

play(cd,start,length,fs,fl)

Play a track from the SDL::Cdrom given as first parameter, second parameter is the frame to start, the third is the lenght to play. It returns 1 on succés 0 on error.

pause(cd)

Pause the playing of the SDL::Cdrom given as first parameter. It returns 1 on succés 0 on error.

resume(cd)

Resume the playing of the SDL::Cdrom given as first parameter. It returns 1 on succés 0 on error.

stop(cd)

Stop the playing of the SDL::Cdrom given as first parameter. It returns 1 on succés 0 on error.

eject(cd)

Eject the medium in the SDL::Cdrom given as first parameter. It returns 1 on succés 0 on error.

id(cd)

Return the ID of the drive given as first parameter.

num_tracks(cd)

Return the number of tracks on the SDL::Cdrom given as first parameter.

track(cd,number)

Returns the track description of the track given as second parameter. the first parameter is a SDL:Cdrom.

current(cd)

Return the current played track number given as first parameter.

current_frame(cd)

Return the current frame given as first parameter.

AUTHORS

Top

David J. Goehrig Documentation by Tels <http://bloodgate.com/>.

SEE ALSO

Top

perl SDL::Mixer SDL::App.