Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_CDDrive

CD drive audio interface.
Contained in: global
Derived from: none
Derived by: none
Group: Sound (CD Audio)

#include <ClanLib/sound.h>

### public function member index:

### Construction:

``virtual`` | `~CL_CDDrive` | `()`;
``virtual` `bool`` | `init` | `()`;

### Attributes:

``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` | `()`;

### Operations:

``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` | `()`;

## Description:

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

## Function Member Descriptions:

CL_CDDrive::get_cd_name - Get the name of the CD.
``virtual` `std::string`` `get_cd_name` `()`;

CL_CDDrive::get_cur_frame - Returns the current frame on the track.
``virtual` `int`` `get_cur_frame` `()`;

CL_CDDrive::get_cur_track - Returns the current track.
``virtual` `int`` `get_cur_track` `()`;

CL_CDDrive::get_drive_path - Get the path of the CD drive. (what is this, starch?)
``virtual` `std::string`` `get_drive_path` `()`;

CL_CDDrive::get_num_tracks - Get the number of tracks available on the cd.
``virtual` `int`` `get_num_tracks` `()`;

CL_CDDrive::init - Call this one to initialize the cd drive.
``virtual` `bool`` `init` `()`;

CL_CDDrive::is_playing - Returns true if the CD drive is playing.
``virtual` `bool`` `is_playing` `()`;

CL_CDDrive::pause - Pause the playback.
``virtual` `void`` `pause` `()`;

CL_CDDrive::play_frames - Play from frame 'frame' to 'end_frame'.
``virtual` `bool`` `play_frames` `(`int` `frame`, `int` `end_frame`=0)`;

> frame - Begin frame.
> end_frame - End frame.

CL_CDDrive::play_track - Play track 'track'. Returns true if successful.
``virtual` `bool`` `play_track` `(`int` `track`)`;

CL_CDDrive::play_tracks - Play from track 'track' til track 'end_track'.
``virtual` `bool`` `play_tracks` `(`int` `track`, `int` `end_track`=0)`;

> track - Begin track.
> end_track - End track.

CL_CDDrive::resume - Resume the playback.
``virtual` `void`` `resume` `()`;

CL_CDDrive::stop - Stop playing.
``virtual` `void`` `stop` `()`;

CL_CDDrive::~CL_CDDrive - CD Drive Destructor
``virtual`` `~CL_CDDrive` `()`;