1SDL_CDPlayTracks(3)            SDL API Reference           SDL_CDPlayTracks(3)
2
3
4

NAME

6       SDL_CDPlayTracks - Play the given CD track(s)
7

SYNOPSIS

9       #include "SDL.h"
10
11       int  SDL_CDPlayTracks(SDL_CD  *cdrom, int start_track, int start_frame,
12       int ntracks, int nframes));
13

DESCRIPTION

15       SDL_CDPlayTracks plays the given CD starting at track start_track,  for
16       ntracks tracks.
17
18       start_frame is the frame offset, from the beginning of the start_track,
19       at which to start. nframes is the frame offset, from the  beginning  of
20       the last track (start_track+ntracks), at which to end playing.
21
22       SDL_CDPlayTracks  should  only  be called after calling SDL_CDStatus to
23       get track information about the CD.
24
25              Note:
26
27              Data tracks are ignored.
28

RETURN VALUE

30       Returns 0, or -1 if there was an error.
31

EXAMPLES

33       /* assuming cdrom is a previously opened device */
34       /* Play the entire CD */
35       if(CD_INDRIVE(SDL_CDStatus(cdrom)))
36         SDL_CDPlayTracks(cdrom, 0, 0, 0, 0);
37
38       /* Play the first track */
39       if(CD_INDRIVE(SDL_CDStatus(cdrom)))
40         SDL_CDPlayTracks(cdrom, 0, 0, 1, 0);
41
42       /* Play first 15 seconds of the 2nd track */
43       if(CD_INDRIVE(SDL_CDStatus(cdrom)))
44         SDL_CDPlayTracks(cdrom, 1, 0, 0, CD_FPS*15);
45

SEE ALSO

47       SDL_CDPlay, SDL_CDStatus, SDL_CD
48
49
50
51SDL                         Tue 11 Sep 2001, 22:58         SDL_CDPlayTracks(3)
Impressum