Better handling of eof_mp3 events: Keep playing as long as there is data remaining.

This commit is contained in:
2022-08-22 13:57:20 +02:00
parent fb6b5bced6
commit b9df55012f
3 changed files with 8 additions and 1 deletions

View File

@@ -208,4 +208,10 @@ bool Controller::is_button_pressed(uint8_t pin) {
}
}
return false;
}
void Controller::eof_mp3() {
log_d("Handling eof. Keep playing until the file is finished.");
while(audio.isRunning()) { audio.loop(); yield; }
next_track();
}