SoundManager Class Reference

Bibliothèque de fonctions sonores. More...

#include <SoundManager.h>

List of all members.

Public Member Functions

 SoundManager ()
 Contructeur.
 ~SoundManager ()
 Destructeur.
int playSound (String SoundFile, int Volume, int Range, bool Loop=false)
 Loads and decodes a static soundfile into memory, and play it.
void freeSound (int soundchannel)
 Removes a sample from memory and makes its slot available again.
void setFading (int soundchannel)
 Memorise un Channel devant subir un fading audio.
void updateSoundSource (int Channel, Vector3 VectorPos)
 Définit (ou met à jour) de la position des sons 3D (moteur, etc).
int playSoundAmbiance (String SoundFile)
 Joue un son continu de type "ambiance sonore" audible dans une piece seulement.
int playSoundMoving (String SoundFile)
 Joue un son continu de type "moving object".
int playSoundShort (String SoundFile, bool Loop=false)
 Joue un son bref de type "Beep".
int playSoundShip (String SoundFile, bool Loop=false)
 Joue un son de type "ambiance sonore" audible dans le vaisseau entier.
int playSoundObject (String SoundFile, bool Loop=false)
 Joue un son pour un objet.

Static Public Member Functions

static SoundManagergetSingletonPtr (void)

Protected Member Functions

bool frameStarted (const FrameEvent &evt)
 Gestionnaire de son.
int fadeSound (int soundchannel)
 Effectue un fading progressif du channel audio.
void initSounds ()
 Initialise le tableau des channels audio.

Protected Attributes

Real mTimer_fading
int mSoundChannel [MAX_CHANNELS]
 Timer pour le fading des audios.


Detailed Description

Bibliothèque de fonctions sonores.

Fait l'interface avec la librairie Audio (FMOD).


Constructor & Destructor Documentation

SoundManager::SoundManager  ) 
 

Contructeur.

SoundManager::~SoundManager  ) 
 

Destructeur.


Member Function Documentation

int SoundManager::fadeSound int  soundchannel  )  [protected]
 

Effectue un fading progressif du channel audio.

Cette fonction doit etre appelée plusieurs fois de suite à intervalles réguliers

bool SoundManager::frameStarted const FrameEvent &  evt  )  [protected]
 

Gestionnaire de son.

Gestion des fading audio

void SoundManager::freeSound int  soundchannel  ) 
 

Removes a sample from memory and makes its slot available again.

SoundManager * SoundManager::getSingletonPtr void   )  [static]
 

void SoundManager::initSounds  )  [protected]
 

Initialise le tableau des channels audio.

int SoundManager::playSound String  SoundFile,
int  Volume,
int  Range,
bool  Loop = false
 

Loads and decodes a static soundfile into memory, and play it.

Parametres: SoundFile: préciser le chemin complet Volume: c'est la distance, à partir de laquelle le son commence à décroitre. Range: c'est la distance à partir de laquelle le son a fini de décroitre et se stabilise. renvoie le No de channel du son. Exemples d'utilisation: Pour le son d'ambiance d'une pièce de rayon 300: 300,10000: Le son est constant dans toute la pièce, puis il décroit au delà des murs. Pour un bip = 20,100: Le son est audible autour de l'émetteur et ne décroit quasiment pas. Pour un objet bruyant = 20,10000: Le son est audible autour de l'émetteur, et décroit rapidement quand on s'éloigne. L'appel a cette fonction ciommence à jouer le son. Si on veut que la source du son bouge, il faut appeler SFX_updateSoundSource().

int SoundManager::playSoundAmbiance String  SoundFile  ) 
 

Joue un son continu de type "ambiance sonore" audible dans une piece seulement.

Le son est constant sur le rayon typique d'une piece (300 unités), puis décroit jusqu'à l'infini, ou il devient inaudible. (l'infini est représenté ici par 10.000)

int SoundManager::playSoundMoving String  SoundFile  ) 
 

Joue un son continu de type "moving object".

Le son est constant sur une faible distance (15 unités) puis décroit jusqu'à l'infini ou il devient inaudible. (l'infini est représenté ici par 10.000)

int SoundManager::playSoundObject String  SoundFile,
bool  Loop = false
 

Joue un son pour un objet.

Le son est constant sur une faible distance (15 unités) puis décroit jusqu'à l'infini ou il devient inaudible. (l'infini est représenté ici par 10.000)

int SoundManager::playSoundShip String  SoundFile,
bool  Loop = false
 

Joue un son de type "ambiance sonore" audible dans le vaisseau entier.

Le son est constant sur le rayon typique du vaisseau (1.000 unités), puis décroit jusqu'à l'infini, ou il devient inaudible. (l'infini est représenté ici par 10.000)

int SoundManager::playSoundShort String  SoundFile,
bool  Loop = false
 

Joue un son bref de type "Beep".

void SoundManager::setFading int  soundchannel  ) 
 

Memorise un Channel devant subir un fading audio.

void SoundManager::updateSoundSource int  Channel,
Vector3  VectorPos
 

Définit (ou met à jour) de la position des sons 3D (moteur, etc).


Member Data Documentation

int SoundManager::mSoundChannel[MAX_CHANNELS] [protected]
 

Timer pour le fading des audios.

Real SoundManager::mTimer_fading [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 21:33:16 2006 for Long Forgotten Earth by  doxygen 1.4.6-NO