Copyright (C) 2000-2012 |
Manpages SDL_CDSection: SDL API Reference (3)Updated: Tue 11 Sep 2001, 22:58 Index Return to Main Contents NAMESDL_CD- CDROM Drive InformationSTRUCTURE DEFINITION
typedef struct{ int id; CDstatus status; int numtracks; int cur_track; int cur_frame; SDL_CDtrack track[SDL_MAX_TRACKS+1]; } SDL_CD; STRUCTURE DATA
DESCRIPTIONAn 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. EXAMPLES
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); SEE ALSOSDL_CDOpen, SDL_CDtrack
IndexThis document was created by man2html, using the manual pages. Time: 16:30:06 GMT, April 26, 2024 |