Commit | Line | Data |
---|---|---|
896b04ee | 1 | =pod |
2 | ||
896b04ee | 3 | =head1 NAME |
4 | ||
5 | SDL::Cdrom - a SDL perl extension for managing CD-ROM drives | |
6 | ||
7 | =head1 SYNOPSIS | |
8 | ||
9 | use SDL::Cdrom; | |
10 | $cdrom = SDL::Cdrom->new(0); | |
11 | $cdrom->play(); | |
12 | ||
13 | =head1 EXPORTS | |
14 | ||
15 | =over 4 | |
16 | ||
17 | =item * | |
18 | ||
19 | C<cd_num_drives>. | |
20 | ||
21 | =back | |
22 | ||
23 | =head1 DESCRIPTION | |
24 | ||
25 | Create a new SDL::Cdrom object. The passed $id is the number of the drive, | |
26 | whereas 0 is the first drive etc. | |
27 | ||
28 | use SDL::Cdrom; | |
29 | my $drive => SDL::Cdrom->new($id); | |
30 | ||
31 | =head1 METHODS | |
32 | ||
33 | =head2 cd_num_drives() | |
34 | ||
35 | Returns the number of CD-ROM drives present. | |
36 | ||
472bc0a1 | 37 | =head2 name(cd) |
896b04ee | 38 | |
39 | Returns the system dependent name of the CD-ROM device. | |
472bc0a1 | 40 | It takes a SDL::Cdrom as first parameter. |
896b04ee | 41 | |
472bc0a1 | 42 | =head2 status(cd) |
896b04ee | 43 | |
44 | Return the status of the drive. | |
472bc0a1 | 45 | It takes a SDL::Cdrom as first parameter. |
896b04ee | 46 | |
472bc0a1 | 47 | =head2 play(cd,start,length,fs,fl) |
896b04ee | 48 | |
472bc0a1 | 49 | 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. |
50 | It returns 1 on succés 0 on error. | |
896b04ee | 51 | |
472bc0a1 | 52 | =head2 pause(cd) |
896b04ee | 53 | |
472bc0a1 | 54 | Pause the playing of the SDL::Cdrom given as first parameter. |
55 | It returns 1 on succés 0 on error. | |
896b04ee | 56 | |
472bc0a1 | 57 | =head2 resume(cd) |
896b04ee | 58 | |
472bc0a1 | 59 | Resume the playing of the SDL::Cdrom given as first parameter. |
60 | It returns 1 on succés 0 on error. | |
896b04ee | 61 | |
472bc0a1 | 62 | =head2 stop(cd) |
896b04ee | 63 | |
472bc0a1 | 64 | Stop the playing of the SDL::Cdrom given as first parameter. |
65 | It returns 1 on succés 0 on error. | |
896b04ee | 66 | |
472bc0a1 | 67 | =head2 eject(cd) |
896b04ee | 68 | |
472bc0a1 | 69 | Eject the medium in the SDL::Cdrom given as first parameter. |
70 | It returns 1 on succés 0 on error. | |
896b04ee | 71 | |
472bc0a1 | 72 | =head2 id(cd) |
896b04ee | 73 | |
472bc0a1 | 74 | Return the ID of the drive given as first parameter. |
896b04ee | 75 | |
472bc0a1 | 76 | =head2 num_tracks(cd) |
896b04ee | 77 | |
472bc0a1 | 78 | Return the number of tracks on the SDL::Cdrom given as first parameter. |
896b04ee | 79 | |
472bc0a1 | 80 | =head2 track(cd,number) |
896b04ee | 81 | |
472bc0a1 | 82 | Returns the track description of the track given as second parameter. |
83 | the first parameter is a SDL:Cdrom. | |
896b04ee | 84 | |
472bc0a1 | 85 | =head2 current(cd) |
896b04ee | 86 | |
472bc0a1 | 87 | Return the current played track number given as first parameter. |
896b04ee | 88 | |
472bc0a1 | 89 | =head2 current_frame(cd) |
896b04ee | 90 | |
472bc0a1 | 91 | Return the current frame given as first parameter. |
896b04ee | 92 | |
93 | =head1 AUTHORS | |
94 | ||
95 | David J. Goehrig | |
96 | Documentation by Tels <http://bloodgate.com/>. | |
97 | ||
98 | =head1 SEE ALSO | |
99 | ||
100 | L<perl> L<SDL::Mixer> L<SDL::App>. | |
101 | ||
102 | =cut |