SoundBase Class Reference

#include <twgui_sound.h>

Inheritance diagram for SoundBase:

TwguiSound List of all members.

Public Member Functions

virtual void load ()
virtual void save ()
virtual void set_volume (double sound_volume, double music_volume, int sound_on, int music_on)
virtual void init ()=0
virtual TwguiMusicBasecreate_music ()=0
virtual TwguiSampleBasecreate_sample ()=0

Public Attributes

char sound_on
char music_on
double sound_volume
double music_volume

Detailed Description

The use of this sound lib is not required. If you wish, you can replace twgui-sound stuff with your own music library. Again, if you wish, you can overload the following base class for that purpose, so that the menu will make use of this. If you don't like this, you'll have to write your own management system. Apart from the obvious volume settings management, 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 TwguiMusicBase* SoundBase::create_music  )  [pure virtual]
 

overload this to create a music piece that can play using some audio device

Implemented in TwguiSound.

virtual TwguiSampleBase* SoundBase::create_sample  )  [pure virtual]
 

overload this to create a sound effect sample that can play using some audio device

Implemented in TwguiSound.

virtual void SoundBase::init  )  [pure virtual]
 

overload this to allocate an audio device

Implemented in TwguiSound.

void SoundBase::load  )  [virtual]
 

initialize sound settings from an already opened config file

void SoundBase::save  )  [virtual]
 

write sound settings to an already opened config file

void SoundBase::set_volume double  sound_volume,
double  music_volume,
int  sound_on,
int  music_on
[virtual]
 

adjust volume settings (this does not actively change sound level - that's left to the individual samples


Member Data Documentation

char SoundBase::music_on
 

allow music to be played or not

double SoundBase::music_volume
 

level of music

char SoundBase::sound_on
 

allow sound effects to be played or not

double SoundBase::sound_volume
 

level of sound effects


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