fix: hall music_player

This commit is contained in:
2021-10-11 12:22:29 +02:00
parent 820117d871
commit 3767c02ad3
6 changed files with 16 additions and 4 deletions

View File

@@ -8,6 +8,8 @@ AudioOutputI2S *out;
uint8_t audio_current_Song = 0;
uint8_t n = 0;
bool audio_start = false;
const char *waveFile[] =
{"/ringoffire.mp3",
"/Let_it_be.mp3",
@@ -83,10 +85,17 @@ void handleAudio()
{
Serial.println("Audio: stop playback");
mp3->stop();
audio_start = false;
}
}
else
{
if(!audio_start)
{
playSong(audio_current_Song);
audio_start = true;
}
if (mp3->isRunning())
{
if (!mp3->loop())