diff --git a/platformio.ini b/platformio.ini index 6f041c1..14faec5 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,12 +10,13 @@ [env:heltec_wifi_lora_32] ;platform = https://github.com/platformio/platform-espressif32.git#feature/stage -platform = espressif32 +platform = espressif32@1.0.2 +;platform = espressif32 board = heltec_wifi_lora_32 board_f_cpu = 240000000L board_f_flash = 80000000L framework = arduino -build_flags = -DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE -DDEBUG_INT_ALLOC_DECISIONS=1 +;build_flags = -DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE -DDEBUG_INT_ALLOC_DECISIONS=1 ; -DCONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=y board_build.partitions = min_spiffs.csv ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables https://github.com/espressif/arduino-esp32/tree/master/tools/partitions @@ -26,8 +27,8 @@ lib_deps = u8g2 NTPClient ; ESP8266Audio - https://github.com/earlephilhower/ESP8266Audio.git -; https://github.com/h3ndrik/ESP8266Audio.git +; https://github.com/earlephilhower/ESP8266Audio.git + https://github.com/h3ndrik/ESP8266Audio.git#dma_buf_count https://github.com/Gianbacchio/ESP8266_Spiram.git Adafruit Unified Sensor Adafruit BME280 Library diff --git a/src/mp3.cpp b/src/mp3.cpp index 8807f74..48f4462 100644 --- a/src/mp3.cpp +++ b/src/mp3.cpp @@ -143,7 +143,7 @@ void MP3::mp3_decoder_task(void *pvParameters) { audiobuffer = buff; buff->RegisterStatusCB(StatusCallback, (void*)"buffer"); if (out == NULL) { - out = new AudioOutputI2S(I2S_NUM_0, AudioOutputI2S::EXTERNAL_I2S, AudioOutputI2S::APLL_DISABLE); + out = new AudioOutputI2S(I2S_NUM_0, AudioOutputI2S::EXTERNAL_I2S, 32, AudioOutputI2S::APLL_DISABLE); out->SetPinout(12, 13, 25); //out->SetRate(44100); //out->SetBitsPerSample(I2S_BITS_PER_SAMPLE_16BIT); @@ -177,7 +177,7 @@ void MP3::mp3_decoder_task(void *pvParameters) { break; } if (!playing) break; - vTaskDelay(5 / portTICK_PERIOD_MS); + vTaskDelay(20 / portTICK_PERIOD_MS); } playing = false;