A short sound effect, loaded fully into memory and playable on demand. For longer tracks streamed from disk, use MusicStream.
More...
#include <Sound.hpp>
|
| | Sound (Path *path) |
| | Load a sound sample from an audio file.
|
| | ~Sound () |
| void | play () override |
| | Start, or resume, playback.
|
| void | pause () override |
| | Pause playback, keeping the current position.
|
| void | reset () override |
| | Stop playback and rewind to the beginning.
|
| bool | is_playing () const override |
| | Whether the audio is currently playing.
|
A short sound effect, loaded fully into memory and playable on demand. For longer tracks streamed from disk, use MusicStream.
◆ Sound()
| turbo::Sound::Sound |
( |
Path * | path | ) |
|
|
explicit |
Load a sound sample from an audio file.
- Parameters
-
| path | path to the audio file |
◆ ~Sound()
◆ is_playing()
| bool turbo::Sound::is_playing |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Whether the audio is currently playing.
Implements turbo::Audio.
◆ pause()
| void turbo::Sound::pause |
( |
| ) |
|
|
overridevirtual |
Pause playback, keeping the current position.
Implements turbo::Audio.
◆ play()
| void turbo::Sound::play |
( |
| ) |
|
|
overridevirtual |
◆ reset()
| void turbo::Sound::reset |
( |
| ) |
|
|
overridevirtual |
Stop playback and rewind to the beginning.
Implements turbo::Audio.
◆ sample
| ALLEGRO_SAMPLE* turbo::Sound::sample = nullptr |
|
protected |
◆ sample_instance
| ALLEGRO_SAMPLE_INSTANCE* turbo::Sound::sample_instance = nullptr |
|
protected |
The documentation for this class was generated from the following files: