SoundManager Class Reference

The Sound Manager is the central interface point to all sound related functions of this program. More...

Inheritance diagram for SoundManager:

Inheritance graph
[legend]
Collaboration diagram for SoundManager:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SoundManager ()
 Constructor.
 ~SoundManager ()
 Deconstructor.
void init ()
 Initialise the SoundManager.
void clear ()
 Clears the SoundManager.
void grab ()
 Increases the reference counter.
void drop ()
 Decreases the reference counter.
f32 getGlobalVolume () const
 Gets the current global volume of all sounds.
sf::SoundBuffer * getSoundBuffer (const std::string &fileName)
 Gets the sound buffer with the given filename.
bool loadSoundBuffer (const std::string &fileName)
 Creates a sound buffer from the given file.
bool loadSoundBufferFromMemory (const std::string &name, c8 *buffer, long length)
 Creates a sound buffer from memory.
void removeSoundBuffers ()
 Removes all sound buffers.
bool removeSoundBuffer (const std::string &fileName)
 Removes the sound buffer with the given filename.
void setGlobalVolume (f32 volume)
 Sets the global volume of all sounds.


Detailed Description

The Sound Manager is the central interface point to all sound related functions of this program.

Definition at line 29 of file SoundManager.h.


Constructor & Destructor Documentation

SoundManager::SoundManager (  ) 

Constructor.

Definition at line 25 of file SoundManager.cpp.

SoundManager::~SoundManager (  ) 

Deconstructor.

Definition at line 31 of file SoundManager.cpp.


Member Function Documentation

void SoundManager::clear (  ) 

Clears the SoundManager.

Definition at line 42 of file SoundManager.cpp.

void SoundManager::drop (  )  [virtual]

Decreases the reference counter.

Note:
This is a dummy function.

Reimplemented from ReferenceCounted.

Definition at line 54 of file SoundManager.cpp.

f32 SoundManager::getGlobalVolume (  )  const

Gets the current global volume of all sounds.

Definition at line 60 of file SoundManager.cpp.

sf::SoundBuffer * SoundManager::getSoundBuffer ( const std::string &  fileName  ) 

Gets the sound buffer with the given filename.

Parameters:
fileName Name of the buffer to retrieve.
Returns:
Returns the sound buffer on success, else NULL.

Definition at line 66 of file SoundManager.cpp.

void SoundManager::grab (  )  [virtual]

Increases the reference counter.

Note:
This is a dummy function.

Reimplemented from ReferenceCounted.

Definition at line 48 of file SoundManager.cpp.

void SoundManager::init (  ) 

Initialise the SoundManager.

Definition at line 37 of file SoundManager.cpp.

bool SoundManager::loadSoundBuffer ( const std::string &  fileName  ) 

Creates a sound buffer from the given file.

Parameters:
fileName Filename where the buffer should be loaded from.

Definition at line 77 of file SoundManager.cpp.

bool SoundManager::loadSoundBufferFromMemory ( const std::string &  name,
c8 *  buffer,
long  length 
)

Creates a sound buffer from memory.

Parameters:
name Name of the new sound buffer.
buffer Pointer to the start of the buffer.
length Length of the buffer.

Definition at line 119 of file SoundManager.cpp.

bool SoundManager::removeSoundBuffer ( const std::string &  fileName  ) 

Removes the sound buffer with the given filename.

Parameters:
fileName Name of the buffer to remove.

Definition at line 146 of file SoundManager.cpp.

void SoundManager::removeSoundBuffers (  ) 

Removes all sound buffers.

Definition at line 136 of file SoundManager.cpp.

void SoundManager::setGlobalVolume ( f32  volume  ) 

Sets the global volume of all sounds.

Parameters:
volume New global volume.

Definition at line 166 of file SoundManager.cpp.


The documentation for this class was generated from the following files:

Generated on Fri Aug 21 23:55:18 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8