SDLPP::SoundManager Class Reference

#include <sdlpp_sound.h>

Inheritance diagram for SDLPP::SoundManager:
SDLPP::Singleton

List of all members.

Classes

struct  SoundClipState

Public Member Functions

virtual void shutdown ()
void initialize (int freq, bool stereo)
void pause (bool state=true)
void clear (int duration=0)
int get_freq () const
bool is_stereo () const
void play (SoundClip clip, bool loop)
void play (SoundStream stream)
SDL_AudioSpec * get_audio_spec ()

Static Public Member Functions

static SoundManagerinstance (bool destroy=false)

Friends

class std::auto_ptr< SoundManager >

Detailed Description

Audio subsystem management singleton object Provides management, mixing and streaming functionality. It is initialized by the Application::init_audio function and then used automatically by SoundClip objects.


Member Function Documentation

void SDLPP::SoundManager::clear ( int  duration = 0  ) 

Remove all clips and silence all audio Optionally, a fade out can be selected, by specifying positive duration

int SDLPP::SoundManager::get_freq (  )  const [inline]

Returns the sampling frequency used. This may differ from what was requested in initialization, if the hardware does not support the requested frequency.

void SDLPP::SoundManager::initialize ( int  freq,
bool  stereo 
)

Initialize audio system to 16 bit signed. Specify sampling frequency and mono/stereo.

static SoundManager* SDLPP::SoundManager::instance ( bool  destroy = false  )  [inline, static]

Returns a pointer to the sound management object

void SDLPP::SoundManager::pause ( bool  state = true  ) 

Stop all playback. Clips will continue from where they were when unpause is done.

void SDLPP::SoundManager::play ( SoundStream  stream  ) 

Send a stream for playback

void SDLPP::SoundManager::play ( SoundClip  clip,
bool  loop 
)

Send a sound clip

void SDLPP::SoundManager::shutdown (  )  [virtual]

Destroys the sound management object. This is called automatically before program exit.

Implements SDLPP::Singleton.


The documentation for this class was generated from the following files:
Generated on Wed May 26 17:41:01 2010 for SDLPP by  doxygen 1.6.3