Track player causing audio underflows

Not sure if this a configuration issue or a track player issue. But if it seems like the track player can cause audio distortions by trying to play the track repeatedly. If the track doesn’t exist, it’s doing it so often that it takes up all the sd card reading time, and the result is audio underflows.

I guess we need to add something to prevent it if there are no files. Are we able to check track length?

Probably the easiest thing to do is to check if track_player_->IsPlaying() is true before and after calling StartOrStopTrack(). If both are false, then stop trying.

Or maybe we can change StartOrStopTrack() to return a bool, indicating success or failure.

Ok, I’ll have a look at it. Thanks.

PR submitted, this only seems to occur if there were no tracks set up in font/tracks or common/tracks and the default track did not exist. So on first Loop we check if the track player is playing anything and if not we turn off the playback to prevent it from “looping” itself.