ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

DefaultAudioCDManager Class Reference

The default audio cd manager. More...

#include <default-audiocd.h>

Inheritance diagram for DefaultAudioCDManager:
Collaboration diagram for DefaultAudioCDManager:

List of all members.

Public Member Functions

 DefaultAudioCDManager ()
virtual ~DefaultAudioCDManager ()
virtual bool open ()
 Initialize the specified CD drive for audio playback.
virtual void close ()
 Close the currently open CD drive.
virtual bool play (int track, int numLoops, int startFrame, int duration, bool onlyEmulate=false, Audio::Mixer::SoundType soundType=Audio::Mixer::kMusicSoundType)
 Start audio CD playback.
virtual void stop ()
 Stop audio playback.
virtual bool isPlaying () const
 Get if audio is being played.
virtual void setVolume (byte volume)
 Set the audio volume.
virtual void setBalance (int8 balance)
 Set the speakers balance.
virtual void update ()
 Update audio status.
virtual Status getStatus () const
 Get the playback status.

Protected Member Functions

bool openRealCD ()
 Open a CD using the cdrom config variable.
virtual bool openCD (int drive)
 Open a CD using the specified drive index.
virtual bool openCD (const Common::String &drive)
 Open a CD from a specific drive.

Protected Attributes

Audio::SoundHandle _handle
bool _emulating
Status _cd
Audio::Mixer_mixer

Detailed Description

The default audio cd manager.

Implements emulation of audio cd playback.

Definition at line 36 of file default-audiocd.h.


Constructor & Destructor Documentation

DefaultAudioCDManager::DefaultAudioCDManager (  ) 

Definition at line 28 of file default-audiocd.cpp.

DefaultAudioCDManager::~DefaultAudioCDManager (  )  [virtual]

Definition at line 41 of file default-audiocd.cpp.


Member Function Documentation

void DefaultAudioCDManager::close (  )  [virtual]

Close the currently open CD drive.

Implements AudioCDManager.

Reimplemented in SdlAudioCDManager.

Definition at line 52 of file default-audiocd.cpp.

DefaultAudioCDManager::Status DefaultAudioCDManager::getStatus (  )  const [virtual]

Get the playback status.

Returns:
a Status struct with playback data.

Implements AudioCDManager.

Definition at line 144 of file default-audiocd.cpp.

bool DefaultAudioCDManager::isPlaying (  )  const [virtual]

Get if audio is being played.

Returns:
true if CD audio is playing

Implements AudioCDManager.

Reimplemented in SdlAudioCDManager.

Definition at line 105 of file default-audiocd.cpp.

bool DefaultAudioCDManager::open (  )  [virtual]

Initialize the specified CD drive for audio playback.

Returns:
true if the CD drive was inited successfully

Implements AudioCDManager.

Reimplemented in SdlAudioCDManager.

Definition at line 46 of file default-audiocd.cpp.

virtual bool DefaultAudioCDManager::openCD ( int  drive  )  [inline, protected, virtual]

Open a CD using the specified drive index.

Parameters:
drive The index of the drive
Note:
The index is implementation-defined, but 0 is always the best choice

Reimplemented in SdlAudioCDManager.

Definition at line 63 of file default-audiocd.h.

virtual bool DefaultAudioCDManager::openCD ( const Common::String drive  )  [inline, protected, virtual]

Open a CD from a specific drive.

Parameters:
drive The name of the drive/path
Note:
The drive parameter is platform-specific

Definition at line 70 of file default-audiocd.h.

bool DefaultAudioCDManager::openRealCD (  )  [protected]

Open a CD using the cdrom config variable.

Definition at line 150 of file default-audiocd.cpp.

bool DefaultAudioCDManager::play ( int  track,
int  numLoops,
int  startFrame,
int  duration,
bool  onlyEmulate = false,
Audio::Mixer::SoundType  soundType = Audio::Mixer::kMusicSoundType 
) [virtual]

Start audio CD playback.

Parameters:
track the track to play.
numLoops how often playback should be repeated (<=0 means infinitely often).
startFrame the frame at which playback should start (75 frames = 1 second).
duration the number of frames to play.
onlyEmulate determines if the track should be emulated only
soundType What sound type to play as. By default, it's as music
Note:
The onlyEmulate parameter is deprecated.
Returns:
true if the track started playing, false otherwise

Implements AudioCDManager.

Definition at line 57 of file default-audiocd.cpp.

void DefaultAudioCDManager::setBalance ( int8  balance  )  [virtual]

Set the speakers balance.

Implements AudioCDManager.

Definition at line 122 of file default-audiocd.cpp.

void DefaultAudioCDManager::setVolume ( byte  volume  )  [virtual]

Set the audio volume.

Implements AudioCDManager.

Definition at line 114 of file default-audiocd.cpp.

void DefaultAudioCDManager::stop (  )  [virtual]

Stop audio playback.

Implements AudioCDManager.

Reimplemented in SdlAudioCDManager.

Definition at line 97 of file default-audiocd.cpp.

void DefaultAudioCDManager::update (  )  [virtual]

Update audio status.

Implements AudioCDManager.

Reimplemented in SdlAudioCDManager.

Definition at line 130 of file default-audiocd.cpp.


Member Data Documentation

Definition at line 75 of file default-audiocd.h.

Definition at line 73 of file default-audiocd.h.

Definition at line 72 of file default-audiocd.h.

Definition at line 76 of file default-audiocd.h.


The documentation for this class was generated from the following files:


Generated on Sat Jan 12 2019 05:03:20 for ResidualVM by doxygen 1.7.1
curved edge   curved edge