Better handling of eof_mp3 events: Keep playing as long as there is data remaining.
This commit is contained in:
@@ -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();
|
||||
}
|
Reference in New Issue
Block a user