summaryrefslogtreecommitdiff
path: root/src/audio/audio_fsm.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-09-05 09:51:10 +1000
committerjacqueline <me@jacqueline.id.au>2023-09-05 09:51:10 +1000
commit0032896251d8ddc6c2775495445da8fceffba98e (patch)
tree5a7f981a832977c153bc9a292305b61605b8eb66 /src/audio/audio_fsm.cpp
parent382d82a14b1427f18a05eae7fb7763d4fa5bc319 (diff)
downloadtangara-fw-0032896251d8ddc6c2775495445da8fceffba98e.tar.gz
Move UI task to priority 0 during playback
Also other misc task cleanup
Diffstat (limited to 'src/audio/audio_fsm.cpp')
-rw-r--r--src/audio/audio_fsm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/audio/audio_fsm.cpp b/src/audio/audio_fsm.cpp
index f5ce2957..af43c9b9 100644
--- a/src/audio/audio_fsm.cpp
+++ b/src/audio/audio_fsm.cpp
@@ -143,6 +143,9 @@ void Standby::react(const TogglePlayPause& ev) {
void Playback::entry() {
ESP_LOGI(kTag, "beginning playback");
sOutput->SetInUse(true);
+
+ events::System().Dispatch(PlaybackStarted{});
+ events::Ui().Dispatch(PlaybackStarted{});
}
void Playback::exit() {
@@ -153,6 +156,7 @@ void Playback::exit() {
sOutput->SetInUse(false);
events::System().Dispatch(PlaybackFinished{});
+ events::Ui().Dispatch(PlaybackFinished{});
}
void Playback::react(const QueueUpdate& ev) {