pygame   documentation
||  Home  ||  Help Contents  ||
 
|| pygame || cdrom || constants || cursor || display || draw ||
|| event || font || image || joystick || key || mixer ||
|| mixer_music || mouse || movie || sndarray || surfarray || time ||
|| transform ||
 
|| CD || Channel || Clock || Font || Joystick || Movie ||
|| Overlay || Rect || Sound || Surface ||
 
|| color || cursors || sprite ||

CD

The CD object represents a CDROM drive and allows you to access the CD inside that drive. All functions (except get_name() and get_id()) require the CD object to be initialized. This is done with the CD.init() function.
 
Be sure to understand there is a difference between the cdrom module and the CD objects.
eject - ejects cdrom drive
get_all - get all track information for the cd
get_busy - checks if the cd is currently playing
get_current - get current position of the cdrom
get_empty - checks for a cd in the drive
get_id - get device id number for drive
get_init - check if cd is initialized
get_name - query name of cdrom drive
get_numtracks - get number of tracks on cd
get_paused - checks if the cd is currently paused
get_track_audio - check if a track has audio data
get_track_length - check the length of an audio track
get_track_start - check the start of an audio track
init - initialize a cdrom device for use
pause - pause playing cdrom
play - play music from cdrom
quit - uninitialize a cdrom device for use
resume - resume paused cdrom
stop - stops playing cdrom

eject
CD.eject() -> None
 
get_all
CD.get_all() -> tuple
 
get_busy
CD.get_busy() -> bool
 
get_current
CD.get_current() -> track, seconds
 
get_empty
CD.get_empty() -> bool
 
get_id
CD.get_id() -> idnum

 
get_init
CD.get_init() -> bool
 
get_name
CD.get_name(id) -> string
 
get_numtracks
CD.get_numtracks() -> numtracks

 
get_paused
CD.get_paused() -> bool
 
get_track_audio
CD.get_track_audio(track) -> bool
 
get_track_length
CD.get_track_length(track) -> seconds
 
get_track_start
CD.get_track_start(track) -> seconds
 
init
CD.init() -> None
 
pause
CD.pause() -> None
 
play
CD.play(track, [start, end]) -> None
 
quit
CD.quit() -> None

 
resume
CD.resume() -> int
 
stop
CD.stop() -> int