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

SDL mixer manager. More...

#include <sdl-mixer.h>

Collaboration diagram for SdlMixerManager:

List of all members.

Public Member Functions

 SdlMixerManager ()
virtual ~SdlMixerManager ()
virtual void init ()
 Initialize and setups the mixer.
Audio::MixergetMixer ()
 Get the audio mixer implementation.
virtual void suspendAudio ()
 Pauses the audio system.
virtual int resumeAudio ()
 Resumes the audio system.

Protected Member Functions

virtual SDL_AudioSpec getAudioSpec (uint32 rate)
 Returns the desired audio specification.
virtual void startAudio ()
 Starts SDL audio.
virtual void callbackHandler (byte *samples, int len)
 Handles the audio callback.

Static Protected Member Functions

static void sdlCallback (void *this_, byte *samples, int len)
 The mixer callback entry point.

Protected Attributes

Audio::MixerImpl_mixer
 The mixer implementation.
SDL_AudioSpec _obtained
 The obtained audio specification after opening the audio system.
bool _audioSuspended
 State of the audio system.

Detailed Description

SDL mixer manager.

It wraps the actual implementation of the Audio:Mixer used by the engine, and setups the SDL audio subsystem and the callback for the audio mixer implementation.

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


Constructor & Destructor Documentation

SdlMixerManager::SdlMixerManager (  ) 

Definition at line 41 of file sdl-mixer.cpp.

SdlMixerManager::~SdlMixerManager (  )  [virtual]

Definition at line 48 of file sdl-mixer.cpp.


Member Function Documentation

void SdlMixerManager::callbackHandler ( byte samples,
int  len 
) [protected, virtual]

Handles the audio callback.

Definition at line 196 of file sdl-mixer.cpp.

SDL_AudioSpec SdlMixerManager::getAudioSpec ( uint32  rate  )  [protected, virtual]

Returns the desired audio specification.

Definition at line 146 of file sdl-mixer.cpp.

Audio::Mixer* SdlMixerManager::getMixer (  )  [inline]

Get the audio mixer implementation.

Definition at line 48 of file sdl-mixer.h.

void SdlMixerManager::init (  )  [virtual]

Initialize and setups the mixer.

Definition at line 56 of file sdl-mixer.cpp.

int SdlMixerManager::resumeAudio (  )  [virtual]

Resumes the audio system.

Definition at line 213 of file sdl-mixer.cpp.

void SdlMixerManager::sdlCallback ( void *  this_,
byte samples,
int  len 
) [static, protected]

The mixer callback entry point.

Static functions can't be overrided by subclasses, so it invokes the non-static function callbackHandler()

Definition at line 201 of file sdl-mixer.cpp.

void SdlMixerManager::startAudio (  )  [protected, virtual]

Starts SDL audio.

Definition at line 191 of file sdl-mixer.cpp.

void SdlMixerManager::suspendAudio (  )  [virtual]

Pauses the audio system.

Definition at line 208 of file sdl-mixer.cpp.


Member Data Documentation

State of the audio system.

Definition at line 73 of file sdl-mixer.h.

The mixer implementation.

Definition at line 64 of file sdl-mixer.h.

SDL_AudioSpec SdlMixerManager::_obtained [protected]

The obtained audio specification after opening the audio system.

Definition at line 70 of file sdl-mixer.h.


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


Generated on Sat Sep 14 2019 05:03:18 for ResidualVM by doxygen 1.7.1
curved edge   curved edge