version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SDL_CDPlayTracks |
|
|
2 |
!!!SDL_CDPlayTracks |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
RETURN VALUE |
|
|
7 |
EXAMPLES |
|
|
8 |
SEE ALSO |
|
|
9 |
---- |
|
|
10 |
!!NAME |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
SDL_CDPlayTracks- Play the given CD track(s) |
|
|
14 |
!!SYNOPSIS |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
__#include __ |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
__int SDL_CDPlayTracks__(__SDL_CD *cdrom, int |
|
|
21 |
start_track, int start_frame, int ntracks, int |
|
|
22 |
nframes)__); |
|
|
23 |
!!DESCRIPTION |
|
|
24 |
|
|
|
25 |
|
|
|
26 |
__SDL_CDPlayTracks__ plays the given CD starting at track |
|
|
27 |
__start_track__, for __ntracks__ tracks. |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
__start_frame__ is the frame offset, from the beginning |
|
|
31 |
of the __start_track__, at which to start. __nframes__ |
|
|
32 |
is the frame offset, from the beginning of the last track |
|
|
33 |
(__start_track__+__ntracks__), at which to end |
|
|
34 |
playing. |
|
|
35 |
|
|
|
36 |
|
|
|
37 |
__SDL_CDPlayTracks__ should only be called after calling |
|
|
38 |
__SDL_CDStatus__ to get track information about the |
|
|
39 |
CD. |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
__Note:__ |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
Data tracks are ignored. |
|
|
46 |
!!RETURN VALUE |
|
|
47 |
|
|
|
48 |
|
|
|
49 |
Returns __0__, or __-1__ if there was an |
|
|
50 |
error. |
|
|
51 |
!!EXAMPLES |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
/* assuming cdrom is a previously opened device */ |
|
|
55 |
/* Play the entire CD */ |
|
|
56 |
if(CD_INDRIVE(SDL_CDStatus(cdrom))) |
|
|
57 |
SDL_CDPlayTracks(cdrom, 0, 0, 0, 0); |
|
|
58 |
/* Play the first track */ |
|
|
59 |
if(CD_INDRIVE(SDL_CDStatus(cdrom))) |
|
|
60 |
SDL_CDPlayTracks(cdrom, 0, 0, 1, 0); |
|
|
61 |
/* Play first 15 seconds of the 2nd track */ |
|
|
62 |
if(CD_INDRIVE(SDL_CDStatus(cdrom))) |
|
|
63 |
SDL_CDPlayTracks(cdrom, 1, 0, 0, CD_FPS*15); |
|
|
64 |
!!SEE ALSO |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
__SDL_CDPlay__, __SDL_CDStatus__, |
|
|
68 |
__SDL_CD__ |
|
|
69 |
---- |