Next: , Previous: , Up: The (sdl *) Modules   [Contents][Index]


6 CDROM

The external representation of a CDROM Drive object is:

#<SDL-CD [status]>

where status is one of ‘TRAY EMPTY’, ‘STOPPED’, ‘PLAYING’, ‘PAUSED’, ‘DRIVE ERROR’, or ‘???’. (Normally, the last one should never appear.)

Procedure: cd? obj

Return #t iff obj is a CDROM drive object.

Procedure: cd-num-drives

Return the number of CDROM drives.

Procedure: cd-name [drive]

Return a human-readable, system-dependent identifier (a string) for the CDROM, or #f. Optional arg drive is a number specifying which drive.

Procedure: cd-open [drive]

Open the CDROM drive for access and return its handle. If the drive is unavailable, return #f. Optional arg drive is a number specifying which drive.

Procedure: cd-status cdrom

Return the current status of the drive cdrom as a symbol (see cdrom-state enums).

Procedure: cd-in-drive? cdrom

Return #t iff there is a CD in drive cdrom.

Procedure: cd-get-num-tracks cdrom

Return the number of tracks on the CD in drive cdrom.

Procedure: cd-get-cur-track cdrom

Return the current track on the CD in drive cdrom.

Procedure: cd-get-cur-frame cdrom

Return the current frame of the CD in drive cdrom.

Procedure: cd-nth-track-itlo cdrom [n]

For CD in drive cdrom, return four values describing track n (zero if unspecified): id, type, length and offset, all integers except for type, which is a symbol, either audio or data.

Procedure: cd-play-tracks cdrom [start-track [start-frame [n-tracks [n-frames]]]]

Play the given CD tracks in drive cdrom. Play the CD starting at start-track and start-frame for ntracks tracks and nframes frames. If both ntrack and nframe are 0, play until the end of the CD. This procedure will skip data tracks, and should only be called after calling cd-status to get track information about the CD. Return #t if successful.

Procedure: cd-play cdrom start length

Play CD in drive cdrom from start frame for length frames. Return #t if successful.

Procedure: cd-pause cdrom

Pause the CD in drive cdrom. Return #t if successful.

Procedure: cd-resume cdrom

Resume (unpause) the CD in drive cdrom. Return #t if successful.

Procedure: cd-stop cdrom

Stop the CD in drive cdrom. Return #t if successful.

Procedure: cd-eject cdrom

Eject the CD from drive cdrom. Return #t if successful.

Procedure: cd-close cdrom

Close the drive cdrom.

Procedure: cd-msf->frames m [s [f]]

Return frames (an integer) computed fr m, second s and frame f. s and f are optional.

Procedure: frames-msf frames

Break down frames (an integer) and return three values: minute, second and frames (all integers).


Next: OpenGL, Previous: Joystick, Up: The (sdl *) Modules   [Contents][Index]