TwguiSample Class Reference

#include <twgui_audiere.h>

Inheritance diagram for TwguiSample:

TwguiSampleBase List of all members.

Public Member Functions

 ~TwguiSample ()
virtual void load (const char *filename)
virtual void play (double distance)
virtual void play ()
virtual void set_volume (double distance)

Public Attributes

audiere::OutputStreamPtr sample

Detailed Description

This uses the audiere library, to load short-lived samples. These samples do not repeat themselves, and shouldn't last too long - just a couple of seconds. This can be used to play sounds of explosions. Samples are not used by the twgui itself, but can be used for shortlived game objects. Sounds are shortlived, and will be cleaned up by the music library.


Constructor & Destructor Documentation

TwguiSample::~TwguiSample  ) 
 

from audiere tutorial file: If you really _must_ delete an object before its pointer goes out of scope, just set the pointer to 0.


Member Function Documentation

void TwguiSample::load const char *  filename  )  [virtual]
 

This loads a sample, using the global TwguiSound pointer (see below). The sample should be contained or referenced inside an overloaded class.

Implements TwguiSampleBase.

void TwguiSample::play  )  [virtual]
 

play sound, without scaling for distance

Implements TwguiSampleBase.

void TwguiSample::play double  distance  )  [virtual]
 

Sounds that are played, have their volume scaled by distance and reference distance.

Implements TwguiSampleBase.

void TwguiSample::set_volume double  distance  )  [virtual]
 

applies the SoundSystem volumes to a sample

Implements TwguiSampleBase.


Member Data Documentation

audiere::OutputStreamPtr TwguiSample::sample
 

reference to a sample


The documentation for this class was generated from the following files:
Generated on Tue Feb 14 13:48:45 2006 for Twgui by  doxygen 1.4.6-NO