CD-ROM drives specify time either in MSF format
(mins/secs/frames) or directly in frames. A frame is
a standard unit of time on the CD, corresponding to
1/75 of a second. SDL uses frames instead of the MSF
format when specifying track lengths and offsets, but
you can convert between them using the
FRAMES_TO_MSF() and MSF_TO_FRAMES() macros.
SDL doesn't update the track information in the
SDL_CD structure until you call SDL_CDStatus(), so
you should always use SDL_CDStatus() to make sure
there is a CD in the drive and determine what tracks
are available before playing the CD. Note that track
indexes start at 0 for the first track.
SDL has two functions for playing the CD-ROM. You
can either play specific tracks on the CD using
SDL_CDPlayTracks(), or you can play absolute frame
offsets using SDL_CDPlay().
SDL doesn't provide automatic notification of CD
insertion or play completion. To detect these
conditions, you need to periodically poll the status
of the drive with SDL_CDStatus(). Since this call
reads the table of contents for the CD, it should not
be called continuously in a tight loop.