kgoldrunner
KGrSoundBank Class Reference
#include <kgrsoundbank.h>
Inheritance diagram for KGrSoundBank:

Detailed Description
Definition at line 26 of file kgrsoundbank.h.
Public Member Functions | |
| KGrSoundBank (int number) | |
| int | loadSound (const QString &fileName) |
| int | play (int effect, bool looping=false) |
| void | reset () |
| void | setEffectsVolume (double volume) |
| void | setMusicVolume (double volume) |
| void | setMuted (bool mute) |
| void | stop (int token) |
| void | stopAllSounds () |
| ~KGrSoundBank () | |
Constructor & Destructor Documentation
| KGrSoundBank::KGrSoundBank | ( | int | number | ) |
Construct the KGrSoundBank class.
- Parameters:
-
number - how many audio channels are required
Definition at line 23 of file kgrsoundbank.cpp.
| KGrSoundBank::~KGrSoundBank | ( | ) |
Definition at line 35 of file kgrsoundbank.cpp.
Member Function Documentation
| int KGrSoundBank::loadSound | ( | const QString & | fileName | ) |
Load a sound sample.
A token is returned to use to play back the sample.
Definition at line 43 of file kgrsoundbank.cpp.
| int KGrSoundBank::play | ( | int | effect, | |
| bool | looping = false | |||
| ) |
Play a sound effect.
This method returns a token that can be used to stop the sound if it is still playing. Trying to stop a completed sound has no effect.
Definition at line 64 of file kgrsoundbank.cpp.
| void KGrSoundBank::reset | ( | ) |
| void KGrSoundBank::setEffectsVolume | ( | double | volume | ) |
Set volume for the sound effects.
- Parameters:
-
volume the playing volume. 0.0 means mute, 1.0 means full volume.
| void KGrSoundBank::setMusicVolume | ( | double | volume | ) |
Set volume for the background music.
- Parameters:
-
volume the playing volume. 0.0 means mute, 1.0 means full volume.
| void KGrSoundBank::setMuted | ( | bool | mute | ) |
Definition at line 121 of file kgrsoundbank.cpp.
| void KGrSoundBank::stop | ( | int | token | ) |
Stop playing the sound associated with the given token.
Definition at line 99 of file kgrsoundbank.cpp.
| void KGrSoundBank::stopAllSounds | ( | ) |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference