diff --git a/yoRadio/src/audioVS1053/audioVS1053Ex.cpp b/yoRadio/src/audioVS1053/audioVS1053Ex.cpp index 16c6c8d..00b65f3 100644 --- a/yoRadio/src/audioVS1053/audioVS1053Ex.cpp +++ b/yoRadio/src/audioVS1053/audioVS1053Ex.cpp @@ -2473,6 +2473,19 @@ uint32_t Audio::getAudioFileDuration(){ } uint32_t Audio::getAudioCurrentTime(){ return 0; //TODO + uint16_t MP3Status; + + MP3Status = read_register(SCI_HDAT1); + //Serial.print("SCI_HDAT1\t"); Serial.println(MP3Status, BIN); + Serial.print("LAYER\t"); Serial.println(MP3Status>>1 & 0b11); + Serial.print("ID\t"); Serial.println(MP3Status>>3 & 0b11); + //HDAT0[15:12] bitrate https://cdn-shop.adafruit.com/datasheets/vs1053.pdf + + MP3Status = read_register(SCI_HDAT0); + //Serial.print("SCI_HDAT0\t"); Serial.println(MP3Status, BIN); + Serial.print("BITRATE\t"); Serial.println(MP3Status>>12); + + return 0; //TODO } //--------------------------------------------------------------------------------------------------------------------- uint32_t Audio::getAudioDataStartPos() { diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index 45e6efc..b7da669 100644 --- a/yoRadio/src/core/options.h +++ b/yoRadio/src/core/options.h @@ -1,7 +1,7 @@ #ifndef options_h #define options_h -#define YOVERSION "0.8.833" +#define YOVERSION "0.8.834" /******************************************************* DO NOT EDIT THIS FILE. @@ -61,7 +61,7 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti #define TFT_CS 255 #endif #ifndef TFT_RST - #define TFT_RST 15 // Or set to -1 and connect to Esp EN pin + #define TFT_RST -1 // Or set to -1 and connect to Esp EN pin #endif #ifndef TFT_DC #define TFT_DC 4 diff --git a/yoRadio/yoRadio.ino b/yoRadio/yoRadio.ino index 7a2f255..3845484 100644 --- a/yoRadio/yoRadio.ino +++ b/yoRadio/yoRadio.ino @@ -194,5 +194,6 @@ void audio_id3data(const char *info){ //id3 metadata telnet.printf("##AUDIO.ID3#: %s\n", info); } void audio_eof_mp3(const char *info){ //end of file + config.sdResumePos = 0; player.play(random(1, config.store.countStation)); }