fix: hall music_player
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user