---
name: "SDL::Cdrom"
section: "3pm"
platform: "linux"
package: "libsdl-perl"
version: "2.2.5-1+b1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL::Cdrom"
---

# SDL::Cdrom(3pm)

a SDL perl extension for managing CD-ROM drives

## NAME

SDL::Cdrom - a SDL perl extension for managing CD-ROM drives

## SYNOPSIS

```
        use SDL::Cdrom;
        $cdrom = SDL::Cdrom->new(0);
        $cdrom->play();
```

## EXPORTS

- •

  `"CD_NUM_DRIVES"`.

## DESCRIPTION

Create a new SDL::Cdrom object. The passed `$id` is the number of the drive, whereas 0 is the first drive etc.

```
        use SDL::Cdrom;
        my $drive => SDL::Cdrom->new($id);
```

## METHODS

### *CD\_NUM\_DRIVES()*

Returns the number of CD-ROM drives present.

### *name()*

Returns the system dependent name of the CD-ROM device.

### *status()*

Return the status of the drive.

### *play()*

Play a track.

### *pause()*

Pause the playing.

### *resume()*

Resume the playing.

### *stop()*

Stop the playing.

### *eject()*

Eject the medium in the drive.

### *id()*

Return the ID of the drive.

### *num\_tracks()*

Return the number of tracks on the medium.

### *track()*

Returns the track description

### *current()*

Return the current played track number.

### *current\_frame()*

Return the current frame.

## AUTHORS

David J. Goehrig Documentation by Tels \<http://bloodgate.com/\>.

## SEE ALSO

perl SDL::Mixer SDL::App.
