1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 12:37:45 +00:00

SoundPlayer: Optionally allow playback to loop indefinitely

This commit is contained in:
Brendan Coles 2020-11-01 06:19:49 +00:00 committed by Andreas Kling
parent 75dec15b43
commit 90a30f694d
3 changed files with 19 additions and 1 deletions

View file

@ -43,6 +43,7 @@ public:
void stop();
void pause();
void seek(const int position);
void loop(bool);
bool toggle_pause();
void set_loader(OwnPtr<Audio::WavLoader>&&);
@ -62,6 +63,7 @@ private:
void remove_dead_buffers();
bool m_paused { true };
bool m_loop = { false };
size_t m_next_ptr { 0 };
size_t m_last_seek { 0 };
float m_total_length { 0 };