The SoundManager class provides basic music and sound playing functionality. All needed sound effects are stored in the member variable m_sounds. Implemented as a singelton, accessibility for all classes is ensured.
More...
#include <soundmanager.h>
|
std::map< QString, QSoundEffect * > | m_sounds |
|
The SoundManager class provides basic music and sound playing functionality. All needed sound effects are stored in the member variable m_sounds. Implemented as a singelton, accessibility for all classes is ensured.
terminus::SoundManager::SoundManager |
( |
| ) |
|
|
protected |
terminus::SoundManager::~SoundManager |
( |
| ) |
|
|
virtual |
void terminus::SoundManager::initialize |
( |
| ) |
|
|
protected |
void terminus::SoundManager::playSound |
( |
QString |
name | ) |
|
Plays a sound effect of a certain name.
Provided that the desired sound effect is stored on initializiation, the sound effect will be played in full length. Calling the function for the same sound effect a second time, while the sound is still playing from the first invocation, will result in restarting the current sound effect.
- Parameters
-
name | Name of the sound effect meant to be played |
QSoundEffect * terminus::SoundManager::sound |
( |
QString |
name | ) |
|
std::map< QString, QSoundEffect * > terminus::SoundManager::sounds |
( |
| ) |
|
void terminus::SoundManager::toggleBackgroundMusic |
( |
| ) |
|
std::map<QString, QSoundEffect *> terminus::SoundManager::m_sounds |
|
protected |
The documentation for this class was generated from the following files: