SGSoundMgr Class Reference

Manage a collection of SGSoundSample instances. More...

#include <soundmgr_openal.hxx>

List of all members.

Public Member Functions

void init ()
 (re) initialize the sound manager.
void bind ()
 Bind properties for the sound manager.
void unbind ()
 Unbind properties for the sound manager.
void update (double dt)
 Run the audio scheduler.
void pause ()
 Pause all sounds.
void resume ()
 Resume all sounds.
bool is_working () const
 is audio working?
void reinit ()
 reinitialize the sound manager
bool add (SGSoundSample *sound, const string &refname)
 add a sound effect, return true if successful
bool remove (const string &refname)
 remove a sound effect, return true if successful
bool exists (const string &refname)
 return true of the specified sound exists in the sound manager system
SGSoundSamplefind (const string &refname)
 return a pointer to the SGSoundSample if the specified sound exists in the sound manager system, otherwise return NULL
bool play_looped (const string &refname)
 tell the scheduler to play the indexed sample in a continuous loop
bool play_once (const string &refname)
 tell the scheduler to play the indexed sample once
bool is_playing (const string &refname)
 return true of the specified sound is currently being played
bool stop (const string &refname)
 immediate stop playing the sound
void set_volume (const ALfloat vol)
 set overall volume for the application.
void set_listener_pos (ALfloat *pos)
 set the position of the listener (in opengl coordinates)
void set_listener_vel (ALfloat *vel)
 set the velocity of the listener (in opengl coordinates)
void set_listener_orientation (ALfloat *ori)
 set the orientation of the listener (in opengl coordinates)
void set_source_pos_all (ALfloat *pos)
 set the positions of all managed sound sources
void set_source_vel_all (ALfloat *pos)
 set the velocities of all managed sound sources
void init ()
 (re) initialize the sound manager.
void bind ()
 Bind properties for the sound manager.
void unbind ()
 Unbind properties for the sound manager.
void update (double dt)
 Run the audio scheduler.
void pause ()
 Pause all sounds.
void resume ()
 Resume all sounds.
bool is_working () const
 is audio working?
void reinit ()
 reinitialize the sound manager
bool add (SGSoundSample *sound, const string &refname)
 add a sound effect, return true if successful
SGSoundSampleadd (const string &refname, const char *path, const char *file=NULL)
 Add a sound file to the sound manager.
bool remove (const string &refname)
 remove a sound effect, return true if successful
bool exists (const string &refname)
 return true of the specified sound exists in the sound manager system
SGSoundSamplefind (const string &refname)
 return a pointer to the SGSoundSample if the specified sound exists in the sound manager system, otherwise return NULL
bool play_looped (const string &refname)
 tell the scheduler to play the indexed sample in a continuous loop
bool play_once (const string &refname)
 tell the scheduler to play the indexed sample once
bool is_playing (const string &refname)
 return true of the specified sound is currently being played
bool stop (const string &refname)
 immediate stop playing the sound
slScheduler * get_scheduler ()
 return the audio scheduler


Detailed Description

Manage a collection of SGSoundSample instances.

Definition at line 67 of file soundmgr_openal.hxx.


Member Function Documentation

void SGSoundMgr::set_volume ( const ALfloat  vol  )  [inline]

set overall volume for the application.

Parameters:
vol 1.0 is default, must be greater than 0

Definition at line 186 of file soundmgr_openal.hxx.

void SGSoundMgr::set_listener_orientation ( ALfloat *  ori  )  [inline]

set the orientation of the listener (in opengl coordinates)

Description: ORIENTATION is a pair of 3-tuples representing the 'at' direction vector and 'up' direction of the Object in Cartesian space. AL expects two vectors that are orthogonal to each other. These vectors are not expected to be normalized. If one or more vectors have zero length, implementation behavior is undefined. If the two vectors are linearly dependent, behavior is undefined.

Definition at line 225 of file soundmgr_openal.hxx.

SGSoundSample * SGSoundMgr::add ( const string &  refname,
const char *  path,
const char *  file = NULL 
)

Add a sound file to the sound manager.

The advantage of using this function over the previous one is that it doesn't load a sample if it already is in memory, but instead it uses the already loaded sample data.

Parameters:
refname A refference name to make a distincion between samples.
path The path or full filename of the sample to load.
file An optional filename which will be appended to the path.
Returns:
An instance of the sound for further manipulation.

Definition at line 204 of file soundmgr_plib.cxx.


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

Generated on Thu Dec 18 15:17:28 2008 for SimGear by  doxygen 1.5.6