Open blotfi opened 4 years ago
figure it out
in the mp3loop(), I added
if ( localfile ) // Playing from SD?
{
if ( datamode & DATA ) // Test op playing
{
if ( av == 0 ) // End of mp3 data?
{
datamode = STOPREQD ; // End of local mp3-file detected
if (Flags.myfileplayed== 1) {
datamode = STOPREQD; // stop after myfile
Flags.myfileplayed= 0;
}
else {
if ( playlist_num ) // Playing from playlist?
{
playlist_num++ ; // Yes, goto next item in playlist
datamode = PLAYLISTINIT ;
host = playlist ;
}
else
{
nodeID = selectnextSDnode ( SD_currentnode,
+1 ) ; // Select the next file on SD
host = getSDfilename ( nodeID ) ;
}
hostreq = true ; // Request this host
}
}
}
}
Here is how I start playing an MP3 file,
but how to make the play stop just after that
how can I detect that the play is finished