diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-02-12 15:36:56 +1100 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-02-12 15:36:56 +1100 |
| commit | 9512bd97bbac48fa33339cc248c76070063bbc61 (patch) | |
| tree | 00ecbfecf5961954a7f7e349a73ab0ba52e90d88 /src/audio/include/track_queue.hpp | |
| parent | 679521d8e37171e8698d618fca9a7908348c429f (diff) | |
| download | tangara-fw-9512bd97bbac48fa33339cc248c76070063bbc61.tar.gz | |
Add buttons for shuffle + repeat track
Diffstat (limited to 'src/audio/include/track_queue.hpp')
| -rw-r--r-- | src/audio/include/track_queue.hpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/audio/include/track_queue.hpp b/src/audio/include/track_queue.hpp index 5b14fd4a..fd6061a7 100644 --- a/src/audio/include/track_queue.hpp +++ b/src/audio/include/track_queue.hpp @@ -33,13 +33,13 @@ class RandomIterator { // Note resizing has the side-effect of restarting iteration. auto resize(size_t) -> void; - auto repeat(bool) -> void; + auto replay(bool) -> void; private: size_t seed_; size_t pos_; size_t size_; - bool repeat_; + bool replay_; }; /* @@ -85,6 +85,12 @@ class TrackQueue { auto next() -> void; auto previous() -> void; + /* + * Called when the current track finishes + */ + auto finish() -> void; + + auto skipTo(database::TrackId) -> void; /* @@ -98,6 +104,9 @@ class TrackQueue { auto repeat(bool) -> void; auto repeat() const -> bool; + auto replay(bool) -> void; + auto replay() const -> bool; + auto serialise() -> std::string; auto deserialise(const std::string&) -> void; @@ -115,6 +124,7 @@ class TrackQueue { std::optional<RandomIterator> shuffle_; bool repeat_; + bool replay_; }; } // namespace audio |
