---
name: "CL_CDDrive"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_CDDrive"
---

# CL\_CDDrive(3)

CD drive audio interface.

## NAME

CL\_CDDrive - CD drive audio interface.

## DESCRIPTION

Use this class to control the CDROM drive in your computer.

## CLASS MEMBERS

- virtual **~CL\_CDDrive**()

  - virtual bool **init**()

  - virtual std::string **get\_drive\_path**()

  - virtual std::string **get\_cd\_name**()

  - virtual int **get\_num\_tracks**()

  - virtual bool **is\_playing**()

  - virtual int **get\_cur\_track**()

  - virtual int **get\_cur\_frame**()

  - virtual bool **play\_tracks**(

  ```
  int track,
  int end_track=0)
  ```

- virtual bool **play\_frames**(

  ```
  int frame,
  int end_frame=0)
  ```

- virtual bool **play\_track**(

  ```
  int track)
  ```

- virtual void **stop**()

  - virtual void **pause**()

  - virtual void **resume**()

  ## MEMBERS WITH DESCRIPTIONS

- virtual **~CL\_CDDrive**()

  ```
  Description:
  ```

- virtual bool **init**()

  ```
  Description:
  ```

  Call this one to initialize the cd drive.

- virtual std::string **get\_drive\_path**()

  ```
  Description:
  ```

  Get the path of the CD drive. (what is this, starch?)

- virtual std::string **get\_cd\_name**()

  ```
  Description:
  ```

  Get the name of the CD.

- virtual int **get\_num\_tracks**()

  ```
  Description:
  ```

  Get the number of tracks available on the cd.

- virtual bool **is\_playing**()

  ```
  Description:
  ```

  Returns true if the CD drive is playing.

- virtual int **get\_cur\_track**()

  ```
  Description:
  ```

  Returns the current track.

- virtual int **get\_cur\_frame**()

  ```
  Description:
  ```

  Returns the current frame on the track.

- virtual bool **play\_tracks**(

  ```
  int track,
  int end_track=0)
  ```

  ```
  Parameters:
  track - Begin track.
  end_track - End track.
  ```

  ```
  Description:
  ```

  Play from track 'track' til track 'end\_track'.

- virtual bool **play\_frames**(

  ```
  int frame,
  int end_frame=0)
  ```

  ```
  Parameters:
  frame - Begin frame.
  end_frame - End frame.
  ```

  ```
  Description:
  ```

  Play from frame 'frame' to 'end\_frame'.

- virtual bool **play\_track**(

  ```
  int track)
  ```

  ```
  Description:
  ```

  Play track 'track'. Returns true if successful.

- virtual void **stop**()

  ```
  Description:
  ```

  Stop playing.

- virtual void **pause**()

  ```
  Description:
  ```

  Pause the playback.

- virtual void **resume**()

  ```
  Description:
  ```

  Resume the playback.

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
