ScummVM API documentation
AudioCDManager Class Referenceabstract

#include <audiocd.h>

Inheritance diagram for AudioCDManager:
Common::NonCopyable DefaultAudioCDManager DCCDManager SdlAudioCDManager

Classes

struct  Status
 

Public Member Functions

virtual bool open ()=0
 
virtual void close ()=0
 
virtual bool play (int track, int numLoops, int startFrame, int duration, bool onlyEmulate=false, Audio::Mixer::SoundType soundType=Audio::Mixer::kMusicSoundType)=0
 
virtual bool playAbsolute (int startFrame, int numLoops, int duration, bool onlyEmulate=false, Audio::Mixer::SoundType soundType=Audio::Mixer::kMusicSoundType, const char *cuesheet="disc.cue")=0
 
virtual bool isPlaying () const =0
 
virtual void setVolume (byte volume)=0
 
virtual void setBalance (int8 balance)=0
 
virtual void stop ()=0
 
virtual void update ()=0
 
virtual Status getStatus () const =0
 
virtual bool existExtractedCDAudioFiles (uint track)=0
 
virtual bool isDataAndCDAudioReadFromSameCD ()=0
 

Detailed Description

Abstract Audio CD manager class. Subclasses implement the actual functionality.

Member Function Documentation

◆ open()

virtual bool AudioCDManager::open ( )
pure virtual

Initialize the specified CD drive for audio playback.

Returns
true if the CD drive was inited successfully

Implemented in DefaultAudioCDManager, and SdlAudioCDManager.

◆ close()

virtual void AudioCDManager::close ( )
pure virtual

Close the currently open CD drive

Implemented in DefaultAudioCDManager, and SdlAudioCDManager.

◆ play()

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

Start audio CD playback

Parameters
trackthe track to play.
numLoopshow often playback should be repeated (<=0 means infinitely often).
startFramethe frame at which playback should start (75 frames = 1 second).
durationthe number of frames to play.
onlyEmulatedetermines if the track should be emulated only
soundTypeWhat 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

Implemented in DCCDManager, DefaultAudioCDManager, and SdlAudioCDManager.

◆ playAbsolute()

virtual bool AudioCDManager::playAbsolute ( int  startFrame,
int  numLoops,
int  duration,
bool  onlyEmulate = false,
Audio::Mixer::SoundType  soundType = Audio::Mixer::kMusicSoundType,
const char *  cuesheet = "disc.cue" 
)
pure virtual

Start audio CD playback at a specific absolute timestamp

Parameters
startFramethe frame at which playback should start (75 frames = 1 second).
numLoopshow often playback should be repeated (<=0 means infinitely often).
durationthe number of frames to play.
onlyEmulatedetermines if the track should be emulated only
soundTypeWhat sound type to play as. By default, it's as music
cuesheetThe name of the cuesheet to use for timing data
Note
The onlyEmulate parameter is deprecated.
Returns
true if the track started playing, false otherwise

Implemented in DefaultAudioCDManager.

◆ isPlaying()

virtual bool AudioCDManager::isPlaying ( ) const
pure virtual

Get if audio is being played.

Returns
true if CD audio is playing

Implemented in DCCDManager, DefaultAudioCDManager, and SdlAudioCDManager.

◆ setVolume()

virtual void AudioCDManager::setVolume ( byte  volume)
pure virtual

Set the audio volume

Implemented in DefaultAudioCDManager.

◆ setBalance()

virtual void AudioCDManager::setBalance ( int8  balance)
pure virtual

Set the speakers balance

Implemented in DefaultAudioCDManager.

◆ stop()

virtual void AudioCDManager::stop ( )
pure virtual

Stop audio playback.

Implemented in DCCDManager, DefaultAudioCDManager, and SdlAudioCDManager.

◆ update()

virtual void AudioCDManager::update ( )
pure virtual

Update audio status.

Implemented in DefaultAudioCDManager, and SdlAudioCDManager.

◆ getStatus()

virtual Status AudioCDManager::getStatus ( ) const
pure virtual

Get the playback status.

Returns
a Status struct with playback data.

Implemented in DefaultAudioCDManager.

◆ existExtractedCDAudioFiles()

virtual bool AudioCDManager::existExtractedCDAudioFiles ( uint  track)
pure virtual

Checks whether the extracted audio cd tracks exists as files in the search paths.

Returns
true if audio files of the expected naming scheme are found, and supported by ScummVM.

Implemented in DefaultAudioCDManager.

◆ isDataAndCDAudioReadFromSameCD()

virtual bool AudioCDManager::isDataAndCDAudioReadFromSameCD ( )
pure virtual

Checks if game data are read from the same CD drive which should also play game CD audio.

Returns
true, if this case is applicable, and the system doesn't allow it.

Implemented in DefaultAudioCDManager.


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