1SDL::CDTrack(3)       User Contributed Perl Documentation      SDL::CDTrack(3)
2
3
4

NAME

6       SDL::CDTrack -- SDL Bindings for structure SDL_CDTrack
7

CATEGORY

9       Core, CDROM, Structure
10

SYNOPSIS

12        use SDL;
13        use SDL::CDROM;
14        use SDL::CD ':status';
15        use SDL::CDTrack;
16
17        SDL::init( SDL_INIT_CDROM );
18
19        my $drives = SDL::CDROM::num_drives();
20
21        if( $drives > 0 )
22        {
23            my $CD = SDL::CD->new(0); #first drive's CD
24
25            if($CD)
26            {
27                if( $CD->status != CD_TRAYEMPTY )
28                {
29                    my $track = SDL::CD->track(0);
30                }
31            }
32        }
33

CONSTANTS

35       The constants are exported by default. You can avoid this by doing:
36
37        use SDL::CDTrack ();
38
39       and access them directly:
40
41        SDL::CDTrack::SDL_AUDIO_TRACK;
42
43       or by choosing the export tags below:
44
45       Export tag: ':type'
46
47        SDL_AUDIO_TRACK
48        SDL_DATA_TRACK
49

METHOD

51   id
52        $track->id() # 0-99
53
54       Track number
55
56   type
57        $track->type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK
58
59       Type of track
60
61   length
62        $track->length()
63
64       Length, in frames, of this track
65
66   offset
67        $track->offset()
68
69       Frame offset to the beginning of this track
70

SEE ALSO

72       SDL::CDROM, SDL::CD
73

AUTHORS

75       See "AUTHORS" in SDL.
76
77
78
79perl v5.32.0                      2020-07-28                   SDL::CDTrack(3)
Impressum