CDDrive

Provide an interface to the Cdrom class. More...

Publicly inherits QObject.

Public Methods

CDDrive( );

Public Slots

voidchangeDbasePath( );
voidchangePollTime( );
voidchangeProgram( int length, int* tracks );
voidchangeShuffle( );
voidchangeStep( int step );
voiddecrVolume( );
voideject( );
voidincrVolume( );
voidnextTrack( );
voidpause( );
voidplay( );
voidplayTrack( int track );
voidpreviousTrack( );
voidstop( );

Protected Methods

voidtimerEvent( QTimerEvent* e );

Private Methods

voidchangeStatus( CdromStatus status, int absTime, int relTime );
booldoNewDisc( );
voiddoNoDisc( );
voiddoTime( int absTime, int relTime );
voiddoUpdateTime( int frame );
voiddoUpdateTrack( );

Signals

voiddone( );
voidnewDisc( CompactDisc* cd );
voidnoDisc( );
voidupdateStatus( CdromStatus status );
voidupdateStep( int step );
voidupdateTime( int minute, int second );
voidupdateTrack( int track, const char* name );
voidupdateVolume( int volume );

Private Data Members

CompactDisc*_cd;
int_desiredTrack;
int_relTime;
CdromStatus_status;
int_timerID;
int_track;
int_volume;

Detailed Documentation

Provide an interface to the Cdrom class.

This class provides an interface to the Cdrom class for manipulating audio comapct discs. All the normal operations (play/pause/stop/eject/etc...) are supported. However cue and review are not currently supported because of problems with some drives.

Public Methods Documentation

CDDrive ( );

Initialize the CDDrive object, and start the polling timer. There should be only one instance of this object for the entire application.

Public Slots Documentation

void changeDbasePath ( );

Re-read the disc info from the new database file.

void changePollTime ( );

Change the poll time pref.

void changeProgram ( int length, int* tracks );

Change the tracks in the UserProgram.

void changeShuffle ( );

Toggle random play mode on/off.

void changeStep ( int step );

Process a change in the program step.

void decrVolume ( );

Decrease the volume by one unit.

void eject ( );

Eject the drive tray.

void incrVolume ( );

Increase the volume by one unit.

void nextTrack ( );

Go to the next track.

void pause ( );

Pause the current play operation.

void play ( );

Begin playing the current desired track.

void playTrack ( int track );

Begin playing a specific track.

void previousTrack ( );

Go to the previous track.

void stop ( );

Stop any active play operation.

Protected Methods Documentation

void timerEvent ( QTimerEvent* e );

Poll the cdrom for its current status, play time, and track.

Private Methods Documentation

void changeStatus ( CdromStatus status, int absTime, int relTime );

Process a new status reading from the CDDrive.

bool doNewDisc ( );

Process the detection of a new disc.

void doNoDisc ( );

Process the detection of the abscence of a disc.

void doTime ( int absTime, int relTime );

Calculate the current play time taking into account the time mode.

void doUpdateTime ( int frame );

Convert from frames to minutes and seconds, and emit the time.

void doUpdateTrack ( );

Process a change in the currently playing track.

Signals Documentation

void done ( );

Emitted when the current play operation completes.

void newDisc ( CompactDisc* cd );

Emitted when a new disc is detected.

The CompactDisc object of the new disc is given.

void noDisc ( );

Emitted when the absence of a disc is detected.

void updateStatus ( CdromStatus status );

Emitted when the audio status of the CDROM changes.

Possible values for the status are: Playing, Paused, Stopped, Completed, and Error.

void updateStep ( int step );

Emitted when the program step changes.

void updateTime ( int minute, int second );

Emitted when the time changes.

void updateTrack ( int track, const char* name );

Emitted when the track number changes.

void updateVolume ( int volume );

Emitted when the volume changes.

The range of the volume is from 0 to 63.


Return to Index.
Automatically generated on Dec 29 18:17