diff --git a/Adafruit_VS1053.cpp b/Adafruit_VS1053.cpp index f486789..82c9a38 100644 --- a/Adafruit_VS1053.cpp +++ b/Adafruit_VS1053.cpp @@ -310,7 +310,12 @@ void Adafruit_VS1053_FilePlayer::feedBuffer_noLock(void) { // must be at the end of the file if (_loopPlayback) { // play in loop +#if defined(USE_SDFAT_FAT32) + char fileName[32]; + if (currentTrack.getName(fileName, 32) && isMP3File(fileName)) { +#else if (isMP3File(currentTrack.name())) { +#endif currentTrack.seek(mp3_ID3Jumper(currentTrack)); } else { currentTrack.seek(0); diff --git a/Adafruit_VS1053.h b/Adafruit_VS1053.h index 6a45d16..e4ceefc 100644 --- a/Adafruit_VS1053.h +++ b/Adafruit_VS1053.h @@ -19,9 +19,14 @@ #include -#if defined(PREFER_SDFAT_LIBRARY) +#if defined(PREFER_SDFAT_LIBRARY) || defined(USE_SDFAT_FAT32) #include +#if defined(USE_SDFAT_FAT32) +extern SdFat32 SD; +typedef File32 File; +#else extern SdFat SD; +#endif #else #include #endif