ScummVM
AudioCDManager Class Referenceabstract

Abstract Audio CD manager class. More...

#include <audiocd.h>

Inheritance diagram for AudioCDManager:
Collaboration diagram for AudioCDManager:

Classes

struct  Status
 A structure containing the current playback information. More...
 

Public Member Functions

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

Additional Inherited Members

- Private Member Functions inherited from Common::NonCopyable
 NonCopyable ()
 

Detailed Description

Abstract Audio CD manager class.

Subclasses implement the actual functionality.

Definition at line 34 of file audiocd.h.

Constructor & Destructor Documentation

◆ ~AudioCDManager()

virtual AudioCDManager::~AudioCDManager ( )
inlinevirtual

Definition at line 36 of file audiocd.h.

Member Function Documentation

◆ close()

virtual void AudioCDManager::close ( )
pure virtual

Close the currently open CD drive.

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.

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

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

◆ 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 DefaultAudioCDManager, and SdlAudioCDManager.

◆ setBalance()

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

Set the speakers balance.

Implemented in DefaultAudioCDManager.

◆ setVolume()

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

Set the audio volume.

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.


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