Fix repeated play leading to scrambled sound

This commit is contained in:
Gabriel Augendre 2023-01-04 15:58:43 +01:00
parent 707a099e63
commit 47267d9217

View file

@ -78,6 +78,7 @@ void play()
{ {
String path = "/" + selectedFile; String path = "/" + selectedFile;
Serial.println("Playing file: " + path); Serial.println("Playing file: " + path);
audio.stopSong();
audio.connecttoFS(SD, path.c_str()); audio.connecttoFS(SD, path.c_str());
} }