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 > 0 ) { my $CD = SDL::CD->new(0); #first drive's CD if($CD) { if( $CD->status != CD_TRAYEMPTY ) { my $track = SDL::CD->track(0); } } }
use SDL::CDTrack ();
and access them directly:
SDL::CDTrack::SDL_AUDIO_TRACK;
or by choosing the export tags below:
Export tag: ':type'
SDL_AUDIO_TRACK SDL_DATA_TRACK
$track->id() # 0-99
$track->type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK
$track->length()
Length, in frames, of this track
$track->offset()
Frame offset to the beginning of this track