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

## pygame.cdrom

The cdrom module provides a few functions to initialize the CDROM subsystem and to manage the CD objects. The CD objects are created with the pygame.cdrom.CD() function. This function needs a cdrom device number to work on. All cdrom drives on the system are enumerated for use as a CD object. To access most of the CD functions, you'll need to init() the CD. (note that the cdrom module will already be initialized). When multiple CD objects are created for the same CDROM device, the state and values for those CD objects will be shared.
You can call the CD.get_name() and CD.get_id() functions without initializing the CD object.
Be sure to understand there is a difference between the cdrom module and the CD objects.

CD | - create new CD object
get_count | - query number of cdroms on system
get_init | - query init of cdrom module
init | - initialize the cdrom subsystem
quit | - uninitialize the cdrom subsystem

CD
`pygame.cdrom.CD(id) -> CD`

Creates a new CD object for the given CDROM id. The given id must be less than the value from pygame.cdrom.get_count().

get_count
`pygame.cdrom.get_count() -> int`

Returns the number of CDROM drives available on the system.

get_init
`pygame.cdrom.get_init() -> bool`

Returns true of the cdrom module is initialized

init
`pygame.cdrom.init() -> None`

Initialize the CDROM module manually

quit
`pygame.cdrom.quit() -> None`

Uninitialize the CDROM module manually