.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "pods::SDL::CDTrack 3pm" .TH pods::SDL::CDTrack 3pm 2024-01-10 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME SDL::CDTrack \-\- SDL Bindings for structure SDL_CDTrack .SH CATEGORY .IX Header "CATEGORY" Core, CDROM, Structure .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& use SDL; \& use SDL::CDROM; \& use SDL::CD \*(Aq:status\*(Aq; \& 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\*(Aqs CD \& \& if($CD) \& { \& if( $CD\->status != CD_TRAYEMPTY ) \& { \& my $track = SDL::CD\->track(0); \& } \& } \& } .Ve .SH CONSTANTS .IX Header "CONSTANTS" The constants are exported by default. You can avoid this by doing: .PP .Vb 1 \& use SDL::CDTrack (); .Ve .PP and access them directly: .PP .Vb 1 \& SDL::CDTrack::SDL_AUDIO_TRACK; .Ve .PP or by choosing the export tags below: .PP Export tag: ':type' .PP .Vb 2 \& SDL_AUDIO_TRACK \& SDL_DATA_TRACK .Ve .SH METHOD .IX Header "METHOD" .SS id .IX Subsection "id" .Vb 1 \& $track\->id() # 0\-99 .Ve .PP Track number .SS type .IX Subsection "type" .Vb 1 \& $track\->type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK .Ve .PP Type of track .SS length .IX Subsection "length" .Vb 1 \& $track\->length() .Ve .PP Length, in frames, of this track .SS offset .IX Subsection "offset" .Vb 1 \& $track\->offset() .Ve .PP Frame offset to the beginning of this track .SH "SEE ALSO" .IX Header "SEE ALSO" SDL::CDROM, SDL::CD .SH AUTHORS .IX Header "AUTHORS" See "AUTHORS" in SDL.