1 .TH "SDL_CD" "3" "Tue 11 Sep 2001, 22:58" "SDL" "SDL API Reference"
3 SDL_CD\- CDROM Drive Information
4 .SH "STRUCTURE DEFINITION"
13 SDL_CDtrack track[SDL_MAX_TRACKS+1];
20 Private drive identifier
26 Number of tracks on the CD
32 Current frame offset within the track
34 \fBtrack\fR[SDL_MAX_TRACKS+1]
35 Array of track descriptions\&. (see \fI\fBSDL_CDtrack\fR\fR)
38 An \fBSDL_CD\fR structure is returned by \fI\fBSDL_CDOpen\fP\fR\&. It represents an opened CDROM device and stores information on the layout of the tracks on the disc\&.
40 A frame is the base data unit of a CD\&. \fBCD_FPS\fP frames is equal to 1 second of music\&. SDL provides two macros for converting between time and frames: \fBFRAMES_TO_MSF(f, M,S,F)\fP and \fBMSF_TO_FRAMES\fP\&.
44 \f(CWint min, sec, frame;
47 FRAMES_TO_MSF(cdrom->cur_frame, &min, &sec, &frame);
48 printf("Current Position: %d minutes, %d seconds, %d frames
51 frame_offset=MSF_TO_FRAMES(min, sec, frame);\fR
56 \fI\fBSDL_CDOpen\fP\fR, \fI\fBSDL_CDtrack\fR\fR
57 ...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:58