audio updates
This commit is contained in:
@@ -6,7 +6,7 @@ AudioFileSourceLittleFS *file;
|
|||||||
AudioOutputI2S *out;
|
AudioOutputI2S *out;
|
||||||
|
|
||||||
uint8_t audio_current_Song = 0;
|
uint8_t audio_current_Song = 0;
|
||||||
const char *nextAudioFile = "";
|
String nextAudioFile = "";
|
||||||
uint8_t n = 0;
|
uint8_t n = 0;
|
||||||
|
|
||||||
bool audioState = false;
|
bool audioState = false;
|
||||||
@@ -72,6 +72,7 @@ void playSong(String filename)
|
|||||||
{
|
{
|
||||||
if (filename != "")
|
if (filename != "")
|
||||||
{
|
{
|
||||||
|
nextAudioFile = filename;
|
||||||
log_i("now playing %s\n", filename.c_str());
|
log_i("now playing %s\n", filename.c_str());
|
||||||
file = new AudioFileSourceLittleFS(filename.c_str());
|
file = new AudioFileSourceLittleFS(filename.c_str());
|
||||||
id3 = new AudioFileSourceID3(file);
|
id3 = new AudioFileSourceID3(file);
|
||||||
@@ -134,7 +135,7 @@ void handleAudio()
|
|||||||
{
|
{
|
||||||
mp3->stop();
|
mp3->stop();
|
||||||
log_w("Audio: loop");
|
log_w("Audio: loop");
|
||||||
playSong(audio_current_Song);
|
playSong(nextAudioFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user