class AudioDev : public QObject

Base class for audio playing devices.

Inheritance:

AudioDev


Public Fields

Catalog* ToC

Public Methods

AudioDev( void )
virtual void checkProgramCatalog()
[virtual signal]
virtual void cleanDisplay(void)
virtual void DecVol()
[virtual public slot]
virtual void DeviceFirstInit( char *devname )
virtual void IncVol()
[virtual public slot]
virtual void LoadOrEject()
[virtual public slot]
virtual void newItemLabel(char *)
[virtual signal]
virtual void newItemNumber(int)
[virtual signal]
virtual void newPlayMode(int)
[virtual public slot]
virtual void newPlayState(int)
[virtual signal]
virtual void newProgArtist(char *)
[virtual signal]
virtual void newProgLabel(char *)
[virtual signal]
virtual void newProgram(void)
virtual void newTime(int)
[virtual signal]
virtual void newTimeMode(int)
[virtual public slot]
virtual void newVolume(float)
[virtual signal]
virtual void Next()
[virtual public slot]
virtual void Prev()
[virtual public slot]
virtual void StartPlayOrPause()
[virtual public slot]
virtual void StartScanFwd()
[virtual public slot]
virtual void StartScanRev()
[virtual public slot]
virtual void StopPlay()
[virtual public slot]
virtual void StopScan()
[virtual public slot]
virtual void updateToCTrkInf(void)

Documentation

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.]

  
  ----------------------------------------------------------
  ----------------------------------------------------------
  

Catalog* ToC
Points to the Catalog associated with the current device. Any child class should set this pointer whenever the Catalog gets created, destroyed, or recreated.

AudioDev( void )
Class Constructor. Seeds the random number generator with the current time and sets ToC to the null-pointer.

virtual void DeviceFirstInit( char *devname )
Abstract function.

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.

virtual void newProgram(void)
Abstract function.

Implement this method to start a new program after changes to the ToC.

virtual void cleanDisplay(void)
Abstract function.

Implement this method to emit all display-related signals. Other classes use this to signal the AudioDev after any major change.

virtual void updateToCTrkInf(void)
Abstract function.

Implement this method to update track information from the device.

virtual void StartScanFwd()
Public Slot [virtual]

Abstract function.

Implement this method to initiate a forward scan.

This slot typically receives a pressed signal from a "scan-forward" button.

virtual void StartScanRev()
Public Slot [virtual]

Abstract function.

Implement this method to initiate a reverse scan.

This slot typically receives a pressed signal from a "scan-backward" button.

virtual void StopScan()
Public Slot [virtual]

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.

See Also:
StartScanFwd, StartScanRev

virtual void StartPlayOrPause()
Public Slot [virtual]

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.

virtual void StopPlay()
Public Slot [virtual]

Abstract function.

Implement this method to stop play.

virtual void Next()
Public Slot [virtual]

Abstract function.

Implement this method to move to the next item in the playlist.

virtual void Prev()
Public Slot [virtual]

Abstract function.

Implement this method to move to the previous item in the playlist.

virtual void IncVol()
Public Slot [virtual]

Abstract function.

Implement this method to increase the volume by a pre-programmed step.

virtual void DecVol()
Public Slot [virtual]

Abstract function.

Implement this method to decrease the volume by a pre-programmed step.

virtual void newTimeMode(int)
Public Slot [virtual]

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.

See Also:
newTime, TimeMode

virtual void newPlayMode(int)
Public Slot [virtual]

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.

virtual void LoadOrEject()
Public Slot [virtual]

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.

virtual void newVolume(float)
Public Signal [virtual]

Use to emit the new volume after a change.

virtual void newTime(int)
Public Signal [virtual]

Use to emit a time to be displayed. This can be the elapsed time, the remaining time, the total remaining time, etc...

virtual void newItemNumber(int)
Public Signal [virtual]

Emit this when the current item changes, either automatically or through user intervention. Emits the item number.

virtual void newItemLabel(char *)
Public Signal [virtual]

Emit this when the current item changes, either automatically or through user intervention. Emits the label in ToC corresponding to the current item.

virtual void newProgLabel(char *)
Public Signal [virtual]

Use to emit the program title specified in ToC.

virtual void newProgArtist(char *)
Public Signal [virtual]

Use to emit the program's artist, as specified by ToC.

virtual void newPlayState(int)
Public Signal [virtual]

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.

virtual void checkProgramCatalog()
Public Signal [virtual]

Emit this when the device wants to check its ToC to see if it's in any of the databases.

See Also:
MaintainDB


Direct child classes:
AudioCD
See Also:
Catalog, AudioCD

alphabetic index hierarchy of classes


Copyright 1997 by John Weiss [John.Weiss@colorado.edu] "generated by doc++"?! More like mangled ...

generated by doc++