Handle fileplayer ending

Is there a way to detect when a fileplayer file ends... preferably a callback? I want to play the next track in the game soundtrack after I play the first one.

Music =  { playdate.sound.fileplayer.new('SomeFilename'), ...}
Music[1]:play()

Nevermind, I am not sure how I missed this:

playdate.sound.fileplayer:setFinishCallback(func, [arg])
1 Like