/lib/pods/SDL/CDTrack.pod
Unknown | 87 lines | 50 code | 37 blank | 0 comment | 0 complexity | bff4acd7ba0bada81fbee304842d721d MD5 | raw file
1 2=pod 3 4=head1 NAME 5 6SDL::CDTrack -- SDL Bindings for structure SDL_CDTrack 7 8=head1 CATEGORY 9 10Core, CDROM, Structure 11 12=head1 SYNOPSIS 13 14 use SDL; 15 use SDL::CDROM; 16 use SDL::CD ':status'; 17 use SDL::CDTrack; 18 19 SDL::init( SDL_INIT_CDROM ); 20 21 my $drives = SDL::CDROM::num_drives(); 22 23 if( $drives > 0 ) 24 { 25 my $CD = SDL::CD->new(0); #first drive's CD 26 27 if($CD) 28 { 29 if( $CD->status != CD_TRAYEMPTY ) 30 { 31 my $track = SDL::CD->track(0); 32 } 33 } 34 } 35 36=head1 CONSTANTS 37 38The constants are exported by default. You can avoid this by doing: 39 40 use SDL::CDTrack (); 41 42and access them directly: 43 44 SDL::CDTrack::SDL_AUDIO_TRACK; 45 46or by choosing the export tags below: 47 48Export tag: ':type' 49 50 SDL_AUDIO_TRACK 51 SDL_DATA_TRACK 52 53=head1 METHOD 54 55=head2 id 56 57 $track->id() # 0-99 58 59Track number 60 61=head2 type 62 63 $track->type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK 64 65Type of track 66 67=head2 length 68 69 $track->length() 70 71Length, in frames, of this track 72 73=head2 offset 74 75 $track->offset() 76 77Frame offset to the beginning of this track 78 79=head1 SEE ALSO 80 81L<SDL::CDROM>, L<SDL::CD> 82 83=head1 AUTHORS 84 85See L<SDL/AUTHORS>. 86 87=cut