Tao.Sdl SDK Documentation

Sdl.SDL_CD Class

CDROM Drive Information.

For a list of all members of this type, see Sdl.SDL_CD Members.

System.Object
   Tao.Sdl.Sdl.SDL_CD

[Visual Basic]
Public Class Sdl.SDL_CD
[C#]
public class Sdl.SDL_CD

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

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.

Struct from SDL_cdrom.h

            typedef struct{
            int id;
            CDstatus status;
            int numtracks;
            int cur_track;
            int cur_frame;
            SDL_CDtrack track[SDL_MAX_TRACKS+1];
            } SDL_CD;
            

Example

            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\n", min, sec, frame);
                    frame_offset=MSF_TO_FRAMES(min, sec, frame);
            

Requirements

Namespace: Tao.Sdl

Assembly: Tao.Sdl (in Tao.Sdl.dll)

See Also

Sdl.SDL_CD Members | Tao.Sdl Namespace | SDL_CDOpen | Sdl.SDL_CDtrack