ScummVM API documentation
SdlAudioCDManager Class Reference

#include <sdl-audiocd.h>

Inheritance diagram for SdlAudioCDManager:
DefaultAudioCDManager AudioCDManager Common::NonCopyable

Public Member Functions

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

Protected Member Functions

bool openCD (int drive) override
 
- Protected Member Functions inherited from DefaultAudioCDManager
bool openRealCD ()
 
virtual bool openCD (const Common::Path &drive)
 

Protected Attributes

SDL_CD * _cdrom
 
int _cdTrack
 
int _cdNumLoops
 
int _cdStartFrame
 
int _cdDuration
 
uint32 _cdEndTime
 
uint32 _cdStopTime
 
- Protected Attributes inherited from DefaultAudioCDManager
Audio::SoundHandle _handle
 
bool _emulating
 
Status _cd
 
Audio::Mixer_mixer
 

Detailed Description

The SDL audio cd manager. Implements real audio cd playback.

Member Function Documentation

◆ open()

bool SdlAudioCDManager::open ( )
overridevirtual

Initialize the specified CD drive for audio playback.

Returns
true if the CD drive was inited successfully

Reimplemented from DefaultAudioCDManager.

◆ close()

void SdlAudioCDManager::close ( )
overridevirtual

Close the currently open CD drive

Reimplemented from DefaultAudioCDManager.

◆ play()

bool SdlAudioCDManager::play ( int  track,
int  numLoops,
int  startFrame,
int  duration,
bool  onlyEmulate,
Audio::Mixer::SoundType  soundType 
)
overridevirtual

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

Reimplemented from DefaultAudioCDManager.

◆ stop()

void SdlAudioCDManager::stop ( )
overridevirtual

Stop audio playback.

Reimplemented from DefaultAudioCDManager.

◆ isPlaying()

bool SdlAudioCDManager::isPlaying ( ) const
overridevirtual

Get if audio is being played.

Returns
true if CD audio is playing

Reimplemented from DefaultAudioCDManager.

◆ update()

void SdlAudioCDManager::update ( )
overridevirtual

Update audio status.

Reimplemented from DefaultAudioCDManager.

◆ openCD()

bool SdlAudioCDManager::openCD ( int  drive)
overrideprotectedvirtual

Open a CD using the specified drive index

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

Reimplemented from DefaultAudioCDManager.


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