#include <sound.h>
Public Member Functions | |
| SoundSystem (bool muteEffects, bool muteMusic, bool off) | |
| Sets up ASC's sound system. | |
| void | setEffectsMute (bool mute) |
| Turns the sound on and off. | |
| bool | areEffectsMuted () |
| can sounds be played right now ? | |
| bool | isOff () |
| is the soundsystem completely disabled ? | |
| void | playMusic (MusicPlayList *playlist) |
| plays the pieces of music which are referenced in the playlist | |
| void | pauseMusic () |
| Pauses the music that is currently being played. | |
| void | resumeMusic () |
| resumes the music | |
| void | resumePauseMusic () |
| resumes or resumes the music, depending whether is music is paused or playing | |
| void | setMusicVolume (int Volume) |
| Sets the music volume. Range is 0 .. 100. | |
| void | setEffectVolume (int Volume) |
| Sets the sound effect volume. Range is 0 .. 100. | |
| int | getEffectVolume () |
| Returns the sound effect volume. This is already normalized to the 0 .. 128 range of SDL_Mixer ! | |
| ASCString | getDiagnosticText () |
| ~SoundSystem () | |
Static Public Member Functions | |
| static SoundSystem * | getInstance () |
Friends | |
| class | Sound |
| loads a sound from the wave file called name to an Mix_buffer. | |
Definition at line 63 of file sound.h.
| SoundSystem::SoundSystem | ( | bool | muteEffects, | |
| bool | muteMusic, | |||
| bool | off | |||
| ) |
Sets up ASC's sound system.
| muteEffects | The sound is going to be initialized, but no sounds played. Sounds can be enabled at runtime | |
| muteMusic | The sound is going to be initialized, but no music played. Music can be enabled at runtime | |
| off | The sound system is not even going to be initiliazed. Can only be restartet by restarting ASC |
Definition at line 59 of file sound.cpp.
References displayLogMessage(), fatalError(), and warningMessage().
| SoundSystem::~SoundSystem | ( | ) |
| void SoundSystem::setEffectsMute | ( | bool | mute | ) |
Turns the sound on and off.
Definition at line 128 of file sound.cpp.
Referenced by executeUserAction().
| bool SoundSystem::areEffectsMuted | ( | ) | [inline] |
can sounds be played right now ?
Definition at line 101 of file sound.h.
Referenced by executeUserAction().
| bool SoundSystem::isOff | ( | ) | [inline] |
| void SoundSystem::playMusic | ( | MusicPlayList * | playlist | ) |
plays the pieces of music which are referenced in the playlist
Definition at line 212 of file sound.cpp.
References SoundSystem_InternalData::currentPlaylist.
Referenced by PlayListSelector::buttonpressed(), and startMusic().
| void SoundSystem::pauseMusic | ( | ) |
Pauses the music that is currently being played.
Definition at line 219 of file sound.cpp.
Referenced by executeUserAction(), and resumePauseMusic().
| void SoundSystem::resumeMusic | ( | ) |
resumes the music
Definition at line 230 of file sound.cpp.
Referenced by executeUserAction(), and resumePauseMusic().
| void SoundSystem::resumePauseMusic | ( | ) |
resumes or resumes the music, depending whether is music is paused or playing
Definition at line 248 of file sound.cpp.
References pauseMusic(), and resumeMusic().
| void SoundSystem::setMusicVolume | ( | int | Volume | ) |
| void SoundSystem::setEffectVolume | ( | int | Volume | ) |
| int SoundSystem::getEffectVolume | ( | ) | [inline] |
| static SoundSystem* SoundSystem::getInstance | ( | ) | [inline, static] |
Definition at line 127 of file sound.h.
Referenced by PlayListSelector::buttonpressed(), SoundSettings::diag(), executeUserAction(), SoundList::getSound(), and startMusic().
| ASCString SoundSystem::getDiagnosticText | ( | ) |
Definition at line 150 of file sound.cpp.
References SoundSystem_InternalData::currentPlaylist, MusicPlayList::getDiagnosticText(), SoundSystem_InternalData::lastMusicMessage, and ASCString::toString().
Referenced by SoundSettings::diag().
friend class Sound [friend] |
1.5.1