summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio/audio_fsm.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/audio/audio_fsm.cpp b/src/audio/audio_fsm.cpp
index 0119855a..ea0315eb 100644
--- a/src/audio/audio_fsm.cpp
+++ b/src/audio/audio_fsm.cpp
@@ -366,6 +366,12 @@ void Playback::react(const internal::InputFileFinished& ev) {
ESP_LOGI(kTag, "finished playing file");
sServices->track_queue().finish();
if (!sServices->track_queue().current()) {
+ for (int i = 0; i < 20; i++) {
+ if (xStreamBufferIsEmpty(sDrainBuffer)) {
+ break;
+ }
+ vTaskDelay(pdMS_TO_TICKS(200));
+ }
transit<Standby>();
}
}