Base class for audio playing devices.
The AudioDev class is the base class for all audio player devices. Its purpose is to provide something of a consistent template for other QObjects to make use of.Most importantly, it provides access to the audio device's catalog.
The documentation for each slot and signal describes how it should be implemented by a child class. The slots themselves are all abstract functions. So, you can't create a base AudioDev object as a dummy argument for the AudioPanel.
You should never try to reimplement the signals. Just use them as described. [If your child class implements any new signals, you'll need to connect them to a slot on your own.]
---------------------------------------------------------- ----------------------------------------------------------
Implement this method to initialize the audio device associated
with the file, devname, for the first time. Should also
create a Catalog object to hold the ToC. If your new device plays some sort of file, you probably won't
need devname. Instead, you'll probably want to open
some sort of file dialog to get the filename.
Implement this method to start a new program after changes to
the ToC.
Implement this method to emit all display-related signals.
Other classes use this to signal the AudioDev after any
major change.
Implement this method to update track information from the
device.
Abstract function. Implement this method to initiate a forward scan. This slot typically receives a pressed signal from a
"scan-forward" button.
Abstract function. Implement this method to initiate a reverse scan. This slot typically receives a pressed signal from a
"scan-backward" button.
Abstract function. Implement this method to complete a scan operation. Typically, this slot will receive the released signal from
a scan-forward or scan-backward button.
Abstract function. Implement this method to control playing and pausing. It
should start the device playing if it's stopped, pause play if
it's playing, or resume play if it's paused.
Your implementation should handle all of this internally.
Abstract function. Implement this method to stop play.
Abstract function. Implement this method to move to the next item in the playlist.
Abstract function. Implement this method to move to the previous item in the
playlist.
Abstract function. Implement this method to increase the volume by a
pre-programmed step.
Abstract function. Implement this method to decrease the volume by a
pre-programmed step.
Abstract function. Implement this method to emit signals to change the time mode
display icon on the AudioPanel. The parameter will be a
TimeMode enum. You might also use this method to alter any internal flags
that control how the time gets displayed.
Abstract function. Implement this method to emit signals to change the play mode
display icon on the AudioPanel. The parameter will be a
PlayState enum OR-ed with a PlayMode
enum. This method might also perform any necessary operations to
alter the time mode.
Abstract function. Implement this method to eject/retract a CD, or load a new set
of audio files. You'll need to code this one appropriately.
Use to emit the new volume after a change.
Use to emit a time to be displayed. This can be the elapsed
time, the remaining time, the total remaining time, etc...
Emit this when the current item changes, either automatically
or through user intervention. Emits the item number.
Emit this when the current item changes, either automatically
or through user intervention. Emits the label in ToC
corresponding to the current item.
Use to emit the program title specified in ToC.
Use to emit the program's artist, as specified by ToC.
Emit this when the play state changed. E.g.: the device
finishes playing the last item in the program and
automatically stops. The value it emits should be a PlayState enum
OR-ed with a PlayMode enum containing the current
play mode.
Emit this when the device wants to check its ToC to see
if it's in any of the databases.
AudioDev( void )
virtual void DeviceFirstInit( char *devname )
virtual void newProgram(void)
virtual void cleanDisplay(void)
virtual void updateToCTrkInf(void)
virtual void StartScanFwd()
virtual void StartScanRev()
virtual void StopScan()
virtual void StartPlayOrPause()
virtual void StopPlay()
virtual void Next()
virtual void Prev()
virtual void IncVol()
virtual void DecVol()
virtual void newTimeMode(int)
virtual void newPlayMode(int)
virtual void LoadOrEject()
virtual void newVolume(float)
virtual void newTime(int)
virtual void newItemNumber(int)
virtual void newItemLabel(char *)
virtual void newProgLabel(char *)
virtual void newProgArtist(char *)
virtual void newPlayState(int)
virtual void checkProgramCatalog()
Copyright 1997 by John Weiss [John.Weiss@colorado.edu]
"generated by doc++"?! More like mangled generated by doc++