TwguiSampleBase Class Reference

#include <twgui_sound.h>

Inheritance diagram for TwguiSampleBase:

TwguiSample List of all members.

Public Member Functions

virtual void load (const char *filename)=0
virtual void play (double distance)=0
virtual void play ()=0
virtual void set_volume (double distance)=0

Detailed Description

This loads 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. This is only the abstract framework, you need to overload these functions so that they can work with some audio device.


Member Function Documentation

virtual void TwguiSampleBase::load const char *  filename  )  [pure virtual]
 

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

Implemented in TwguiSample.

virtual void TwguiSampleBase::play  )  [pure virtual]
 

play sound, without scaling for distance

Implemented in TwguiSample.

virtual void TwguiSampleBase::play double  distance  )  [pure virtual]
 

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

Implemented in TwguiSample.

virtual void TwguiSampleBase::set_volume double  distance  )  [pure virtual]
 

set the volume, scaled by distance

Implemented in TwguiSample.


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