|id||Private drive identifier|
|numtracks||Number of tracks on the CD|
|cur_frame||Current frame offset within the track|
|Array of track descriptions. (see SDL_CDtrack)|
An SDL_CD structure is returned by SDL_CDOpen. It represents an opened CDROM device and stores information on the layout of the tracks on the disc.
A frame is the base data unit of a CD. CD_FPS frames is equal to 1 second of music. SDL provides two macros for converting between time and frames: FRAMES_TO_MSF(f, M,S,F) and MSF_TO_FRAMES.
int min, sec, frame; int frame_offset;
FRAMES_TO_MSF(cdrom->cur_frame, &min, &sec, &frame); printf("Current Position: %d minutes, %d seconds, %d frames ", min, sec, frame);
frame_offset=MSF_TO_FRAMES(min, sec, frame);
|SDL||SDL_CD (3)||Tue 11 Sep 2001, 22:58|