|
RhythmGame 1.4.3
|
A sound that can be played. More...
#include <Sound.h>

Public Member Functions | |
| virtual | ~Sound ()=default |
| virtual void | play ()=0 |
| Plays the sound. | |
| virtual void | stop ()=0 |
| Stops the sound. | |
| virtual void | setVolume (float volume)=0 |
| Sets the volume of the sound. | |
| virtual auto | isPlaying () const -> bool=0 |
| Is the sound playing right now? | |
| virtual auto | getVolume () const -> float=0 |
| Gets the volume of the sound. | |
A sound that can be played.
The underlying data buffer can be shared between multiple sounds. This means that you can have multiple instances of the same sound playing at the same time, while only loading the file once.
|
virtualdefault |
|
pure virtual |
Gets the volume of the sound.
Implemented in sounds::MultiSound, and sounds::NormalSound.
|
pure virtual |
Is the sound playing right now?
Implemented in sounds::MultiSound, and sounds::NormalSound.
|
pure virtual |
Plays the sound.
This does not block, obviously. Make sure the sound object stays alive.
Implemented in sounds::MultiSound, and sounds::NormalSound.
|
pure virtual |
Sets the volume of the sound.
| volume | The volume. 1 is normal, 0 is silent, 2 is twice as loud. |
Implemented in sounds::MultiSound, and sounds::NormalSound.
|
pure virtual |
Stops the sound.
Does not block. The sound can be played again.
Implemented in sounds::MultiSound, and sounds::NormalSound.