ScummVM API documentation
SdlMixerManager Class Reference

#include <sdl-mixer.h>

Inheritance diagram for SdlMixerManager:
MixerManager

Public Member Functions

virtual void init ()
 
virtual void suspendAudio ()
 
virtual int resumeAudio ()
 
- Public Member Functions inherited from MixerManager
Audio::MixergetMixer ()
 
virtual bool isNullDevice () const
 

Protected Member Functions

virtual SDL_AudioSpec getAudioSpec (uint32 rate)
 
virtual void startAudio ()
 
virtual void callbackHandler (byte *samples, int len)
 

Static Protected Member Functions

static void sdlCallback (void *this_, byte *samples, int len)
 

Protected Attributes

SDL_AudioSpec _obtained
 
bool _isSubsystemInitialized
 
bool _isAudioOpen
 
- Protected Attributes inherited from MixerManager
Audio::MixerImpl_mixer
 
bool _audioSuspended
 

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.

Member Function Documentation

◆ init()

virtual void SdlMixerManager::init ( )
virtual

Initialize and setups the mixer

Implements MixerManager.

◆ suspendAudio()

virtual void SdlMixerManager::suspendAudio ( )
virtual

Pauses the audio system

Implements MixerManager.

◆ resumeAudio()

virtual int SdlMixerManager::resumeAudio ( )
virtual

Resumes the audio system

Implements MixerManager.

◆ getAudioSpec()

virtual SDL_AudioSpec SdlMixerManager::getAudioSpec ( uint32  rate)
protectedvirtual

Returns the desired audio specification

◆ startAudio()

virtual void SdlMixerManager::startAudio ( )
protectedvirtual

Starts SDL audio

◆ callbackHandler()

virtual void SdlMixerManager::callbackHandler ( byte *  samples,
int  len 
)
protectedvirtual

Handles the audio callback

◆ sdlCallback()

static void SdlMixerManager::sdlCallback ( void *  this_,
byte *  samples,
int  len 
)
staticprotected

The mixer callback entry point. Static functions can't be overridden by subclasses, so it invokes the non-static function callbackHandler()

Member Data Documentation

◆ _obtained

SDL_AudioSpec SdlMixerManager::_obtained
protected

The obtained audio specification after opening the audio system.


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