From 7eb05ea983c7f5a735c7b8b3fc915821d5df4d48 Mon Sep 17 00:00:00 2001 From: Mikkeli Matlock Date: Sun, 15 Feb 2026 21:36:56 +0900 Subject: [PATCH] audio_client.cpp fix --- .claude/settings.local.json | 3 ++- components/audio_client/CMakeLists.txt | 2 +- components/audio_client/audio_client.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index c5ab263..baae4d7 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -5,7 +5,8 @@ "Bash(idf.py build:*)", "Bash(for f in DSEG14C_BI_50px.c InziuIosevka_Slab_CC_12px.c InziuIosevka_Slab_CC_16px.c InziuIosevka_Slab_CC_20px.c InziuIosevka_Slab_CC_24px.c InziuIosevka_Slab_CC_32px.c)", "Bash(do sed -i '/\\\\.static_bitmap = 0,/d' \"$f\")", - "Bash(done)" + "Bash(done)", + "Bash(file:*)" ] }, "outputStyle": "iseri", diff --git a/components/audio_client/CMakeLists.txt b/components/audio_client/CMakeLists.txt index 8e2a242..60e0f74 100644 --- a/components/audio_client/CMakeLists.txt +++ b/components/audio_client/CMakeLists.txt @@ -1,5 +1,5 @@ idf_component_register( SRCS "audio_client.cpp" - REQUIRES espressif__esp_websocket_client port_bsp + REQUIRES espressif__esp_websocket_client port_bsp codec_board PRIV_REQUIRES esp_event json INCLUDE_DIRS "./") diff --git a/components/audio_client/audio_client.cpp b/components/audio_client/audio_client.cpp index f747192..37de543 100644 --- a/components/audio_client/audio_client.cpp +++ b/components/audio_client/audio_client.cpp @@ -100,7 +100,7 @@ static void handle_binary_frame(const uint8_t *data, int len) { if (!s_playing) return; - uint8_t *chunk = heap_caps_malloc(len, MALLOC_CAP_SPIRAM); + uint8_t *chunk = (uint8_t *)heap_caps_malloc(len, MALLOC_CAP_SPIRAM); if (!chunk) { ESP_LOGW(TAG, "PSRAM alloc failed (%d bytes)", len); return;