---- Opened the serial port COM5 ----
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:7432
load:0x40078000,len:16564
load:0x40080400,len:4
load:0x40080404,len:4284
entry 0x40080668
I (29) boot: ESP-IDF v5.1-dirty 2nd stage bootloader
I (29) boot: compile time Aug 15 2023 10:02:55
I (29) boot: Multicore bootloader
I (34) boot: chip revision: v3.0
I (38) qio_mode: Enabling default flash chip QIO
I (43) boot.esp32: SPI Speed : 80MHz
I (48) boot.esp32: SPI Mode : QIO
I (52) boot.esp32: SPI Flash Size : 8MB
I (57) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (66) boot: ## Label Usage Type ST Offset Length
I (73) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (80) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (88) boot: 2 factory factory app 00 00 00010000 00500000
I (95) boot: End of partition table
I (100) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=649f4h (412148) map
I (157) esp_image: segment 1: paddr=00074a1c vaddr=3ff80066 size=00008h ( 8) load
I (158) esp_image: segment 2: paddr=00074a2c vaddr=3ffb0000 size=04390h ( 17296) load
I (166) esp_image: segment 3: paddr=00078dc4 vaddr=40080000 size=07254h ( 29268) load
I (177) esp_image: segment 4: paddr=00080020 vaddr=400d0020 size=d7148h (880968) map
I (286) esp_image: segment 5: paddr=00157170 vaddr=40087254 size=16de8h ( 93672) load
I (302) esp_image: segment 6: paddr=0016df60 vaddr=400c0000 size=00068h ( 104) load
I (317) boot: Loaded app from partition at offset 0x10000
I (317) boot: Disabling RNG early entropy source...
I (329) cpu_start: Multicore app
I (329) quad_psram: This chip is ESP32-D0WD
I (330) esp_psram: Found 8MB PSRAM device
I (331) esp_psram: Speed: 80MHz
I (335) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (342) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (352) cpu_start: Pro cpu up.
I (355) cpu_start: Starting app cpu, entry point is 0x40081ec8
I (0) cpu_start: App cpu up.
I (876) esp_psram: SPI SRAM memory test OK
I (884) cpu_start: Pro cpu start user code
I (884) cpu_start: cpu freq: 240000000 Hz
I (884) cpu_start: Application information:
I (887) cpu_start: Project name: toy1
I (891) cpu_start: App version: 1
I (896) cpu_start: Compile time: Aug 15 2023 10:01:28
I (902) cpu_start: ELF file SHA256: 063fe588ef174378...
I (908) cpu_start: ESP-IDF: v5.1-dirty
I (913) cpu_start: Min chip rev: v0.0
I (918) cpu_start: Max chip rev: v3.99
I (923) cpu_start: Chip rev: v3.0
I (927) heap_init: Initializing. RAM available for dynamic allocation:
I (935) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (941) heap_init: At 3FFB94B0 len 00026B50 (154 KiB): DRAM
I (947) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (953) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (960) heap_init: At 4009E03C len 00001FC4 (7 KiB): IRAM
I (966) esp_psram: Adding pool of 4096K of PSRAM memory to heap allocator
I (974) spi_flash: detected chip: gd
I (977) spi_flash: flash io: qio
W (981) ADC: legacy driver is deprecated, please migrate to esp_adc/adc_oneshot.h
W (990) i2s(legacy): legacy i2s driver is deprecated, please migrate to use driver/i2s_std.h, driver/i2s_pdm.h or driver/i2s_tdm.h
I (1002) app_start: Starting scheduler on CPU0
I (1007) app_start: Starting scheduler on CPU1
I (1007) main_task: Started on CPU0
I (1017) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1025) main_task: Calling app_main()
I (1029) MODE_SELECTION: [ 1 ] nvs flash
I (1062) MODE_SELECTION: [ 2 ] Start codec chip
E (1083) gpio: gpio_install_isr_service(498): GPIO isr service already installed
I (1083) MODE_SELECTION: [3.1] Initialize keys on board
I (1086) MODE_SELECTION: [ 3 ] Start and wait for Wi-Fi network
I (1093) MODE_SELECTION: [4] Mount sdcard
W (1112) PERIPH_TOUCH: _touch_init
I (1742) MODE_SELECTION: [ 5 ] Create and start input key service
I (1742) MODE_SELECTION: [ 5 ] mode selection
W (3078) PERIPH_WIFI: WiFi Event cb, Unhandle event_base:WIFI_EVENT, event_id:4
I (4579) MODE_SELECTION: Waiting for mode selection for 300 seconds...
W (17175) AUDIO_EVT: There is no space in external queue
CMakeLists.txtpartitions.csv
// Create I2S stream to read audio data from codec chip
i2s_stream_cfg_t i2s_cfg = I2S_STREAM_CFG_DEFAULT();
i2s_cfg.type = AUDIO_STREAM_READER;
i2s_cfg.i2s_config.sample_rate = AUDIO_SAMPLE_RATE;
i2s_stream_reader = i2s_stream_init(&i2s_cfg);
// Create WAV encoder to encode audio data in WAV format
wav_encoder_cfg_t wav_cfg = DEFAULT_WAV_ENCODER_CONFIG(); // You need to replace this with the actual function for initializing the WAV encoder
audio_element_handle_t wav_encoder = wav_encoder_init(&wav_cfg);
// Create FATFS stream to write WAV data to SD card
ESP_LOGI(TAG, "[3.1] Create fatfs stream to write data to sdcard");
fatfs_stream_cfg_t fatfs_cfg = FATFS_STREAM_CFG_DEFAULT();
fatfs_cfg.type = AUDIO_STREAM_WRITER;
fatfs_stream_writer = fatfs_stream_init(&fatfs_cfg);
// Register all elements to the audio pipeline
audio_pipeline_register(rec_pipeline, i2s_stream_reader, "i2s");
audio_pipeline_register(rec_pipeline, wav_encoder, "wav"); // Update the tag to "wav"
audio_pipeline_register(rec_pipeline, fatfs_stream_writer, "file");
// Link elements together: [codec_chip]-->i2s_stream-->filter-->wav_encoder-->fatfs_stream-->[sdcard]
const char *link_tag[4] = {"i2s", "wav", "file"}; // Update the tag to "wav"
audio_pipeline_link(rec_pipeline, &link_tag[0], 3);
ESP_LOGI(TAG, "[3.6] Set music info to fatfs");
audio_element_info_t music_info = {0};
audio_element_getinfo(i2s_stream_reader, &music_info);
ESP_LOGI(TAG, "[ * ] Save the recording info to the fatfs stream writer, sample_rates=%d, bits=%d, ch=%d",
music_info.sample_rates, music_info.bits, music_info.channels);
audio_element_setinfo(fatfs_stream_writer, &music_info);
//**
void wait_for_mode_selection() {
ESP_LOGI(TAG, "Waiting for mode selection for %d seconds...", MODE_SELECTION_TIMEOUT_SECONDS);
vTaskDelay(MODE_SELECTION_TIMEOUT_SECONDS * 1000 / portTICK_PERIOD_MS);
// If no mode is selected, put the device to sleep
if (!is_recording && !is_playing_sd && !is_playing_http) {
ESP_LOGI(TAG, "No mode selected, entering sleep mode for %d seconds...", SLEEP_TIMEOUT_SECONDS);
// You can replace the sleep mode depending on your device's sleep capabilities
esp_sleep_enable_timer_wakeup(SLEEP_TIMEOUT_SECONDS * 1000000);
esp_deep_sleep_start();
}
---- Opened the serial port COM5 ---- ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:7432 load:0x40078000,len:16564 load:0x40080400,len:4 load:0x40080404,len:4284 entry 0x40080668 I (29) boot: ESP-IDF v5.1-dirty 2nd stage bootloader I (29) boot: compile time Aug 15 2023 10:02:55 I (29) boot: Multicore bootloader I (34) boot: chip revision: v3.0 I (38) qio_mode: Enabling default flash chip QIO I (43) boot.esp32: SPI Speed : 80MHz I (48) boot.esp32: SPI Mode : QIO I (52) boot.esp32: SPI Flash Size : 8MB I (57) boot: Enabling RNG early entropy source... I (62) boot: Partition Table: I (66) boot: ## Label Usage Type ST Offset Length I (73) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (80) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (88) boot: 2 factory factory app 00 00 00010000 00500000 I (95) boot: End of partition table I (100) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=649f4h (412148) map I (157) esp_image: segment 1: paddr=00074a1c vaddr=3ff80066 size=00008h ( 8) load I (158) esp_image: segment 2: paddr=00074a2c vaddr=3ffb0000 size=04390h ( 17296) load I (166) esp_image: segment 3: paddr=00078dc4 vaddr=40080000 size=07254h ( 29268) load I (177) esp_image: segment 4: paddr=00080020 vaddr=400d0020 size=d7148h (880968) map I (286) esp_image: segment 5: paddr=00157170 vaddr=40087254 size=16de8h ( 93672) load I (302) esp_image: segment 6: paddr=0016df60 vaddr=400c0000 size=00068h ( 104) load I (317) boot: Loaded app from partition at offset 0x10000 I (317) boot: Disabling RNG early entropy source... I (329) cpu_start: Multicore app I (329) quad_psram: This chip is ESP32-D0WD I (330) esp_psram: Found 8MB PSRAM device I (331) esp_psram: Speed: 80MHz I (335) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode. W (342) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped I (352) cpu_start: Pro cpu up. I (355) cpu_start: Starting app cpu, entry point is 0x40081ec8 I (0) cpu_start: App cpu up. I (876) esp_psram: SPI SRAM memory test OK I (884) cpu_start: Pro cpu start user code I (884) cpu_start: cpu freq: 240000000 Hz I (884) cpu_start: Application information: I (887) cpu_start: Project name: toy1 I (891) cpu_start: App version: 1 I (896) cpu_start: Compile time: Aug 15 2023 10:01:28 I (902) cpu_start: ELF file SHA256: 063fe588ef174378... I (908) cpu_start: ESP-IDF: v5.1-dirty I (913) cpu_start: Min chip rev: v0.0 I (918) cpu_start: Max chip rev: v3.99 I (923) cpu_start: Chip rev: v3.0 I (927) heap_init: Initializing. RAM available for dynamic allocation: I (935) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (941) heap_init: At 3FFB94B0 len 00026B50 (154 KiB): DRAM I (947) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (953) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (960) heap_init: At 4009E03C len 00001FC4 (7 KiB): IRAM I (966) esp_psram: Adding pool of 4096K of PSRAM memory to heap allocator I (974) spi_flash: detected chip: gd I (977) spi_flash: flash io: qio W (981) ADC: legacy driver is deprecated, please migrate to
esp_adc/adc_oneshot.h
W (990) i2s(legacy): legacy i2s driver is deprecated, please migrate to use driver/i2s_std.h, driver/i2s_pdm.h or driver/i2s_tdm.h I (1002) app_start: Starting scheduler on CPU0 I (1007) app_start: Starting scheduler on CPU1 I (1007) main_task: Started on CPU0 I (1017) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations I (1025) main_task: Calling app_main() I (1029) MODE_SELECTION: [ 1 ] nvs flash I (1062) MODE_SELECTION: [ 2 ] Start codec chip E (1083) gpio: gpio_install_isr_service(498): GPIO isr service already installed I (1083) MODE_SELECTION: [3.1] Initialize keys on board I (1086) MODE_SELECTION: [ 3 ] Start and wait for Wi-Fi network I (1093) MODE_SELECTION: [4] Mount sdcard W (1112) PERIPH_TOUCH: _touch_init I (1742) MODE_SELECTION: [ 5 ] Create and start input key service I (1742) MODE_SELECTION: [ 5 ] mode selection W (3078) PERIPH_WIFI: WiFi Event cb, Unhandle event_base:WIFI_EVENT, event_id:4 I (4579) MODE_SELECTION: Waiting for mode selection for 300 seconds... W (17175) AUDIO_EVT: There is no space in external queue CMakeLists.txt partitions.csv----------------------------- code----------------------------- `
include
include "freertos/FreeRTOS.h"
include "freertos/task.h"
include "freertos/queue.h"
include "esp_log.h"
include "esp_http_client.h"
include "esp_peripherals.h"
include "periph_sdcard.h"
include "audio_pipeline.h"
include "audio_element.h"
include "audio_event_iface.h"
include "audio_common.h"
include "fatfs_stream.h"
include "i2s_stream.h"
include "http_stream.h"
include "esp_adc/adc_oneshot.h"
include "periph_wifi.h"
include "raw_stream.h"
include "mp3_decoder.h"
include "audio_mem.h"
include "driver/gpio.h"
include
include "board.h"
include "driver/i2s_std.h"
include "sdkconfig.h"
include "wav_encoder.h"
include "wav_decoder.h"
include "esp_wifi.h"
include "wifi_service.h"
include "periph_adc_button.h"
include "input_key_service.h"
include "esp_idf_version.h"
include "esp_err.h"
include "nvs_flash.h"
include
if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 1, 0))
include "esp_netif.h"
endif
define RECORD_TIME_SECONDS (120) // 2 minutes in seconds
define HTTP_MAX_TIME_SECONDS (300) // 5 minutes in seconds
define HTTP_MAX_SIZE_BYTES (15 1024 1024) // 15 MB in bytes
define AUDIO_SAMPLE_RATE (16000)
static const char *TAG = "MODE_SELECTION";
define CONFIG_WIFI_SSID "Pixel_2261"
define CONFIG_WIFI_PASSWORD "123412341234"
define MODE_SELECTION_TIMEOUT_SECONDS (5 * 60) // 5 minutes in seconds
define SLEEP_TIMEOUT_SECONDS (5 * 60) // 5 minutes in seconds
audio_element_handle_t i2s_stream_reader, fatfs_stream_writer, wav_encoder, fatfs_stream_reader, http_stream_reader,i2s_stream_writer,wav_decoder,mp3_decoder; esp_periph_set_handle_t set; audio_event_iface_msg_t msg; esp_periph_config_t periph_cfg = DEFAULT_ESP_PERIPH_SET_CONFIG(); static bool is_recording = false; static bool is_playing_sd = false; static bool is_playing_http = false;
bool toogle_switch=false; bool r= false; int mode = 1; const char filename; const char pipeline; const char *element; enum wifi_service_event_t;
static void record_audio(void); static void play_from_http(void); static void play_from_sd_card(const char *filename); void wait_for_mode_selection(void);
//** const int NUM_MODES = 3; //** void app_main(void) {
} //** //** static void record_audio(void) { is_recording = true;
// Create I2S stream to read audio data from codec chip i2s_stream_cfg_t i2s_cfg = I2S_STREAM_CFG_DEFAULT(); i2s_cfg.type = AUDIO_STREAM_READER; i2s_cfg.i2s_config.sample_rate = AUDIO_SAMPLE_RATE; i2s_stream_reader = i2s_stream_init(&i2s_cfg);
// Create WAV encoder to encode audio data in WAV format wav_encoder_cfg_t wav_cfg = DEFAULT_WAV_ENCODER_CONFIG(); // You need to replace this with the actual function for initializing the WAV encoder audio_element_handle_t wav_encoder = wav_encoder_init(&wav_cfg);
// Create FATFS stream to write WAV data to SD card ESP_LOGI(TAG, "[3.1] Create fatfs stream to write data to sdcard"); fatfs_stream_cfg_t fatfs_cfg = FATFS_STREAM_CFG_DEFAULT(); fatfs_cfg.type = AUDIO_STREAM_WRITER; fatfs_stream_writer = fatfs_stream_init(&fatfs_cfg);
// Register all elements to the audio pipeline audio_pipeline_register(rec_pipeline, i2s_stream_reader, "i2s"); audio_pipeline_register(rec_pipeline, wav_encoder, "wav"); // Update the tag to "wav" audio_pipeline_register(rec_pipeline, fatfs_stream_writer, "file");
// Link elements together: [codec_chip]-->i2s_stream-->filter-->wav_encoder-->fatfs_stream-->[sdcard] const char *link_tag[4] = {"i2s", "wav", "file"}; // Update the tag to "wav" audio_pipeline_link(rec_pipeline, &link_tag[0], 3);
ESP_LOGI(TAG, "[3.6] Set music info to fatfs"); audio_element_info_t music_info = {0}; audio_element_getinfo(i2s_stream_reader, &music_info); ESP_LOGI(TAG, "[ * ] Save the recording info to the fatfs stream writer, sample_rates=%d, bits=%d, ch=%d", music_info.sample_rates, music_info.bits, music_info.channels); audio_element_setinfo(fatfs_stream_writer, &music_info);
ESP_LOGI(TAG, "[ 1] Set up event listener"); audio_event_iface_cfg_t evt_cfg = AUDIO_EVENT_IFACE_DEFAULT_CFG(); audio_event_iface_handle_t evt = audio_event_iface_init(&evt_cfg);
ESP_LOGI(TAG, "[1.1] Listening event from pipeline"); audio_pipeline_set_listener(rec_pipeline, evt);
ESP_LOGI(TAG, "[1.2] Listening event from peripherals"); audio_event_iface_set_listener(esp_periph_set_get_event_iface( set), evt);
while (true) {
// Start audio pipeline audio_pipeline_run(rec_pipeline);
ESP_LOGI(TAG, "[ 1.3 ] Listen for all pipeline events, record for %d Seconds", RECORD_TIME_SECONDS); int second_recorded = 0; while (1) { if (audio_event_iface_listen(evt, &msg, 1000 / portTICK_RATE_MS) != ESP_OK) { second_recorded ++; ESP_LOGI(TAG, "[ ] Recording ... %d", second_recorded); if (second_recorded >= RECORD_TIME_SECONDS) { audio_element_set_ringbuf_done(i2s_stream_reader); } continue; } / Stop when the last pipeline element (fatfs_stream_writer in this case) receives stop event / if (msg.source_type == AUDIO_ELEMENT_TYPE_ELEMENT && msg.source == (void ) fatfs_stream_writer && msg.cmd == AEL_MSG_CMD_REPORT_STATUS && (((int)msg.data == AEL_STATUS_STATE_STOPPED) || ((int)msg.data == AEL_STATUS_STATE_FINISHED) || ((int)msg.data == AEL_STATUS_ERROR_OPEN))) { ESP_LOGW(TAG, "[ ] Stop event received"); break; } /pause or play button*/ if (((int)msg.data == get_input_play_id()) && (msg.cmd == PERIPH_ADC_BUTTON_PRESSED || msg.cmd == PERIPH_ADC_BUTTON_PRESSED)) { toogle_switch = !toogle_switch; audio_pipeline_pause(rec_pipeline); ESP_LOGE(TAG, ""); if (toogle_switch) { audio_pipeline_pause(rec_pipeline); } else { audio_pipeline_resume(rec_pipeline); } audio_pipeline_run(rec_pipeline); ESP_LOGE(TAG, "[ 4.1 ] Start playback new pipeline"); } }
is_recording = false; audio_pipeline_stop(rec_pipeline); audio_pipeline_wait_for_stop(rec_pipeline); audio_pipeline_terminate(rec_pipeline); audio_pipeline_unregister(rec_pipeline, i2s_stream_reader); audio_pipeline_unregister(rec_pipeline, wav_encoder); audio_pipeline_unregister(rec_pipeline, fatfs_stream_writer); audio_pipeline_remove_listener(rec_pipeline); audio_event_iface_remove_listener(esp_periph_set_get_event_iface(set), evt); audio_event_iface_destroy(evt); audio_pipeline_deinit(rec_pipeline); vTaskDelete(NULL); } //** static void play_from_sd_card(const char *filename){
is_playing_sd = true; ESP_LOGI(TAG, "[3.1] Create fatfs stream to read data from SD card"); audio_pipeline_cfg_t pipeline_cfg = DEFAULT_AUDIO_PIPELINE_CONFIG(); audio_pipeline_handle_t sd_pipeline = audio_pipeline_init(&pipeline_cfg); mem_assert(sd_pipeline);
ESP_LOGI(TAG, "[3.1] Create fatfs stream to read data from SD card"); fatfs_stream_cfg_t fatfs_cfg = FATFS_STREAM_CFG_DEFAULT(); fatfs_cfg.type = AUDIO_STREAM_READER; fatfs_stream_reader = fatfs_stream_init(&fatfs_cfg);
ESP_LOGI(TAG, "[3.2] Create i2s stream to write data to codec chip"); i2s_stream_cfg_t i2s_cfg = I2S_STREAM_CFG_DEFAULT(); i2s_cfg.type = AUDIO_STREAM_WRITER; i2s_stream_writer = i2s_stream_init(&i2s_cfg);
ESP_LOGI(TAG, "[3.3] Create wav decoder"); wav_decoder_cfg_t wav_dec_cfg = DEFAULT_WAV_DECODER_CONFIG(); audio_element_handle_t wav_decoder = wav_decoder_init(&wav_dec_cfg);
ESP_LOGI(TAG, "[3.4] Register all elements to audio pipeline"); audio_pipeline_register(sd_pipeline, fatfs_stream_reader, "file"); audio_pipeline_register(sd_pipeline, wav_decoder, "wav"); audio_pipeline_register(sd_pipeline, i2s_stream_writer, "i2s");
ESP_LOGI(TAG, "[3.5] Link elements together: [sdcard]-->fatfs_stream-->wav_decoder-->i2s_stream-->[codec_chip]"); const char *link_tag[3] = {"file", "wav", "i2s"}; audio_pipeline_link(sd_pipeline, &link_tag[0], 3);
ESP_LOGI(TAG, "[3.6] Set up uri:test.wav"); audio_element_set_uri(fatfs_stream_reader, filename);
ESP_LOGI(TAG, "[3.6] Set up event listener"); audio_event_iface_cfg_t evt_cfg = AUDIO_EVENT_IFACE_DEFAULT_CFG(); audio_event_iface_handle_t evt = audio_event_iface_init(&evt_cfg); audio_pipeline_set_listener(sd_pipeline, evt); ESP_LOGI(TAG, "[1.2] Listening event from peripherals"); audio_event_iface_set_listener(esp_periph_set_get_event_iface( set), evt);
ESP_LOGI(TAG, "[3.7] Start audio pipeline"); audio_pipeline_run(sd_pipeline);
ESP_LOGI(TAG, "[ 6 ] Listen for all pipeline events"); while (1) { audio_event_iface_msg_t msg; esp_err_t ret = audio_event_iface_listen(evt, &msg, portMAX_DELAY); if (ret != ESP_OK) { ESP_LOGE(TAG, "[ * ] Event interface error : %d", ret); continue; }
} //** static void play_from_http(void) { is_playing_http = true;
audio_pipeline_handle_t http_pipeline = audio_pipeline_init(&pipeline_cfg); mem_assert(http_pipeline);
is_playing_http = false;
//** void wait_for_mode_selection() { ESP_LOGI(TAG, "Waiting for mode selection for %d seconds...", MODE_SELECTION_TIMEOUT_SECONDS); vTaskDelay(MODE_SELECTION_TIMEOUT_SECONDS * 1000 / portTICK_PERIOD_MS);
} `