diff --git a/.clang-tidy.hash b/.clang-tidy.hash index b448915e27..75f0fc9c98 100644 --- a/.clang-tidy.hash +++ b/.clang-tidy.hash @@ -1 +1 @@ -d15ae81646ac0ee76b2586716fe697f187281523ee6db566aed26542a9f98d1a +a34e66dce18eaf9d2d094fedf6b9799bbd9ec1e734f76a29544e3f6d61786c3e diff --git a/esphome/components/audio/__init__.py b/esphome/components/audio/__init__.py index 7b03e4b6a7..6c721652e1 100644 --- a/esphome/components/audio/__init__.py +++ b/esphome/components/audio/__init__.py @@ -1,4 +1,5 @@ import esphome.codegen as cg +from esphome.components.esp32 import add_idf_component import esphome.config_validation as cv from esphome.const import CONF_BITS_PER_SAMPLE, CONF_NUM_CHANNELS, CONF_SAMPLE_RATE import esphome.final_validate as fv @@ -165,4 +166,7 @@ def final_validate_audio_schema( async def to_code(config): - cg.add_library("esphome/esp-audio-libs", "2.0.1") + add_idf_component( + name="esphome/esp-audio-libs", + ref="2.0.3", + ) diff --git a/esphome/components/audio/audio_decoder.cpp b/esphome/components/audio/audio_decoder.cpp index d1ad571a52..8f514468c4 100644 --- a/esphome/components/audio/audio_decoder.cpp +++ b/esphome/components/audio/audio_decoder.cpp @@ -300,7 +300,7 @@ FileDecoderState AudioDecoder::decode_mp3_() { // Advance read pointer to match the offset for the syncword this->input_transfer_buffer_->decrease_buffer_length(offset); - uint8_t *buffer_start = this->input_transfer_buffer_->get_buffer_start(); + const uint8_t *buffer_start = this->input_transfer_buffer_->get_buffer_start(); buffer_length = (int) this->input_transfer_buffer_->available(); int err = esp_audio_libs::helix_decoder::MP3Decode(this->mp3_decoder_, &buffer_start, &buffer_length, diff --git a/esphome/idf_component.yml b/esphome/idf_component.yml index e19c1a1c87..9be787d0cd 100644 --- a/esphome/idf_component.yml +++ b/esphome/idf_component.yml @@ -1,6 +1,8 @@ dependencies: bblanchon/arduinojson: version: "7.4.2" + esphome/esp-audio-libs: + version: 2.0.3 espressif/esp-tflite-micro: version: 1.3.3~1 espressif/esp32-camera: diff --git a/platformio.ini b/platformio.ini index a54aa0964c..62de5aa0d7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -154,7 +154,6 @@ lib_deps = makuna/NeoPixelBus@2.8.0 ; neopixelbus esphome/ESP32-audioI2S@2.3.0 ; i2s_audio droscy/esp_wireguard@0.4.2 ; wireguard - esphome/esp-audio-libs@2.0.1 ; audio kahrendt/ESPMicroSpeechFeatures@1.1.0 ; micro_wake_word build_flags = @@ -178,7 +177,6 @@ lib_deps = ${common:idf.lib_deps} droscy/esp_wireguard@0.4.2 ; wireguard kahrendt/ESPMicroSpeechFeatures@1.1.0 ; micro_wake_word - esphome/esp-audio-libs@2.0.1 ; audio build_flags = ${common:idf.build_flags} -Wno-nonnull-compare