A music track streamed (decoded on the fly) from a file, for audio too long to keep fully in memory. For short effects, use Sound.
More...
#include <MusicStream.hpp>
|
| | MusicStream (Path *path) |
| | Open an audio file as a stream.
|
| | ~MusicStream () |
| 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.
|
|
| ALLEGRO_AUDIO_STREAM * | stream = nullptr |
A music track streamed (decoded on the fly) from a file, for audio too long to keep fully in memory. For short effects, use Sound.
◆ MusicStream()
| turbo::MusicStream::MusicStream |
( |
Path * | path | ) |
|
|
explicit |
Open an audio file as a stream.
- Parameters
-
| path | path to the audio file |
◆ ~MusicStream()
| turbo::MusicStream::~MusicStream |
( |
| ) |
|
◆ is_playing()
| bool turbo::MusicStream::is_playing |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Whether the audio is currently playing.
Implements turbo::Audio.
◆ pause()
| void turbo::MusicStream::pause |
( |
| ) |
|
|
overridevirtual |
Pause playback, keeping the current position.
Implements turbo::Audio.
◆ play()
| void turbo::MusicStream::play |
( |
| ) |
|
|
overridevirtual |
◆ reset()
| void turbo::MusicStream::reset |
( |
| ) |
|
|
overridevirtual |
Stop playback and rewind to the beginning.
Implements turbo::Audio.
◆ stream
| ALLEGRO_AUDIO_STREAM* turbo::MusicStream::stream = nullptr |
|
protected |
The documentation for this class was generated from the following files: