

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. | |
Definition at line 29 of file SoundManager.h.
| SoundManager::SoundManager | ( | ) |
| SoundManager::~SoundManager | ( | ) |
| void SoundManager::clear | ( | ) |
| void SoundManager::drop | ( | ) | [virtual] |
Decreases the reference counter.
Reimplemented from ReferenceCounted.
Definition at line 54 of file SoundManager.cpp.
| f32 SoundManager::getGlobalVolume | ( | ) | const |
| sf::SoundBuffer * SoundManager::getSoundBuffer | ( | const std::string & | fileName | ) |
Gets the sound buffer with the given filename.
| fileName | Name of the buffer to retrieve. |
Definition at line 66 of file SoundManager.cpp.
| void SoundManager::grab | ( | ) | [virtual] |
Increases the reference counter.
Reimplemented from ReferenceCounted.
Definition at line 48 of file SoundManager.cpp.
| void SoundManager::init | ( | ) |
| bool SoundManager::loadSoundBuffer | ( | const std::string & | fileName | ) |
Creates a sound buffer from the given file.
| 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.
| 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.
| fileName | Name of the buffer to remove. |
Definition at line 146 of file SoundManager.cpp.
| void SoundManager::removeSoundBuffers | ( | ) |
| void SoundManager::setGlobalVolume | ( | f32 | volume | ) |
Sets the global volume of all sounds.
| volume | New global volume. |
Definition at line 166 of file SoundManager.cpp.
1.5.8