24 #ifndef _SOUND_MANAGER_H_    25 #define _SOUND_MANAGER_H_    28 #include <iutil/objreg.h>    29 #include <csgeom/vector3.h>    30 #include <csutil/parray.h>    44 #define VOLUME_ZERO 0.0f    45 #define VOLUME_MIN  0.0f    46 #define VOLUME_NORM 1.0f    47 #define VOLUME_MAX  2.0f   102     bool Play2DSound (
const char *name, 
bool loop, 
size_t loopstart,
   103                       size_t loopend, 
float volume_preset,
   122     bool Play3DSound (
const char *name, 
bool loop, 
size_t loopstart,
   123                       size_t loopend, 
float volume_preset,
   125                       float mindist, 
float maxdist, 
float rad, 
int type3d,
   163     csPDelArray<SoundControl> soundController;  
   165     csPDelArray<SoundHandle> soundHandles;      
   168     csTicks                 LastUpdateTime;     
 SoundData is the datakeeper of. 
 
SoundControl * guiSndCtrl
sound control for paws / gui 
 
~SoundSystemManager()
Destructor will remove everything this SoundManager created. 
 
SoundControl * effectSndCtrl
sound control for effects / actions 
 
bool Play3DSound(const char *name, bool loop, size_t loopstart, size_t loopend, float volume_preset, SoundControl *&sndCtrl, csVector3 pos, csVector3 dir, float mindist, float maxdist, float rad, int type3d, SoundHandle *&handle)
Plays a 3D sound. 
 
SoundData * GetSoundData()
 
SoundSystemManager()
Constructor. 
 
void StopSound(SoundHandle *handle)
Stops and removes a SoundHandle. 
 
bool Play2DSound(const char *name, bool loop, size_t loopstart, size_t loopend, float volume_preset, SoundControl *&sndCtrl, SoundHandle *&handle)
Plays a 2D sound (Cannot be converted to 3D). 
 
void UpdateSound()
Checks all SoundHandles alters Volume, does fading and removes them if Unmanaged (Autoremove true)...
 
SoundSystem * GetSoundSystem()
 
void UpdateListener(csVector3 v, csVector3 f, csVector3 t)
Update listener position. 
 
A Volume and Sound control class. 
 
void Update()
Updates this SoundManager and everything its driving. 
 
SoundControl * GetSoundControl()
Returns a NEW SoundControl. 
 
SoundControl * mainSndCtrl
sound control for this manager 
 
bool Initialised
is initialized ? 
 
This Manager Object is used to play all sounds. 
 
This is an Interface Class to the Crystalspace Soundrenderer.