Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

SDL_CD (3)

Name

SDL_CD - CDROM Drive Information

Synopsis

Please see following description for synopsis

Description

SDL_CD(3)                      SDL API Reference                     SDL_CD(3)



NAME
       SDL_CD - CDROM Drive Information

STRUCTURE 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
       id                  Private drive identifier

       status              Drive status

       numtracks           Number of tracks on the CD

       cur_track           Current track

       cur_frame           Current frame offset within the track

       track[SDL_MAX_TRACKS+1]
                           Array of track descriptions. (see SDL_CDtrack)

DESCRIPTION
       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 sec-
       ond 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);

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | library/sdl      |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+
SEE ALSO
       SDL_CDOpen, SDL_CDtrack



NOTES
       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source        was        downloaded        from        https://www.lib-
       sdl.org/release/SDL-1.2.15.tar.gz

       Further information about this software can be found on the open source
       community website at https://www.libsdl.org/.



SDL                         Tue 11 Sep 2001, 22:58                   SDL_CD(3)