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

The SDL audio cd manager. More...

#include <sdl-audiocd.h>

Inheritance diagram for SdlAudioCDManager:
Collaboration diagram for SdlAudioCDManager:

List of all members.

Public Member Functions

 SdlAudioCDManager ()
virtual ~SdlAudioCDManager ()
bool open () override
 Initialize the specified CD drive for audio playback.
void close () override
 Close the currently open CD drive.
bool play (int track, int numLoops, int startFrame, int duration, bool onlyEmulate, Audio::Mixer::SoundType soundType) override
 Start audio CD playback.
void stop () override
 Stop audio playback.
bool isPlaying () const override
 Get if audio is being played.
void update () override
 Update audio status.

Protected Member Functions

bool openCD (int drive) override
 Open a CD using the specified drive index.

Protected Attributes

SDL_CD * _cdrom
int _cdTrack
int _cdNumLoops
int _cdStartFrame
int _cdDuration
uint32 _cdEndTime
uint32 _cdStopTime

Detailed Description

The SDL audio cd manager.

Implements real audio cd playback.

Definition at line 35 of file sdl-audiocd.h.


Constructor & Destructor Documentation

SdlAudioCDManager::SdlAudioCDManager (  ) 

Definition at line 33 of file sdl-audiocd.cpp.

SdlAudioCDManager::~SdlAudioCDManager (  )  [virtual]

Definition at line 45 of file sdl-audiocd.cpp.


Member Function Documentation

void SdlAudioCDManager::close (  )  [override, virtual]

Close the currently open CD drive.

Reimplemented from DefaultAudioCDManager.

Definition at line 76 of file sdl-audiocd.cpp.

bool SdlAudioCDManager::isPlaying (  )  const [override, virtual]

Get if audio is being played.

Returns:
true if CD audio is playing

Reimplemented from DefaultAudioCDManager.

Definition at line 127 of file sdl-audiocd.cpp.

bool SdlAudioCDManager::open (  )  [override, virtual]

Initialize the specified CD drive for audio playback.

Returns:
true if the CD drive was inited successfully

Reimplemented from DefaultAudioCDManager.

Definition at line 49 of file sdl-audiocd.cpp.

bool SdlAudioCDManager::openCD ( int  drive  )  [override, 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 from DefaultAudioCDManager.

Definition at line 58 of file sdl-audiocd.cpp.

bool SdlAudioCDManager::play ( int  track,
int  numLoops,
int  startFrame,
int  duration,
bool  onlyEmulate,
Audio::Mixer::SoundType  soundType 
) [override, 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

Reimplemented from DefaultAudioCDManager.

Definition at line 94 of file sdl-audiocd.cpp.

void SdlAudioCDManager::stop (  )  [override, virtual]

Stop audio playback.

Reimplemented from DefaultAudioCDManager.

Definition at line 86 of file sdl-audiocd.cpp.

void SdlAudioCDManager::update (  )  [override, virtual]

Update audio status.

Reimplemented from DefaultAudioCDManager.

Definition at line 137 of file sdl-audiocd.cpp.


Member Data Documentation

Definition at line 52 of file sdl-audiocd.h.

Definition at line 53 of file sdl-audiocd.h.

Definition at line 52 of file sdl-audiocd.h.

SDL_CD* SdlAudioCDManager::_cdrom [protected]

Definition at line 51 of file sdl-audiocd.h.

Definition at line 52 of file sdl-audiocd.h.

Definition at line 53 of file sdl-audiocd.h.

int SdlAudioCDManager::_cdTrack [protected]

Definition at line 52 of file sdl-audiocd.h.


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


Generated on Sat Mar 23 2019 05:05:56 for ResidualVM by doxygen 1.7.1
curved edge   curved edge