-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AUDIO_ELEMENT: [audio_forge] Read IO type ringbuf but ringbuf not set when #define NUMBER_SOURCE_FILE 2 in Audio Forge Example. (AUD-5319) #1186
Comments
@payday1991 Thanks for your report. Let's check and reply. |
It's fixed on b3add92 |
Hi, this issue is already fixed. If you only need mix, you can use example This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this #include <string.h> static const char *TAG = "AUDIO_FORGE_PIPELINE"; #define DEFAULT_SAMPLERATE 44100 int audio_forge_wr_cb(audio_element_handle_t el, char *buf, int len, TickType_t wait_time, void *ctx) void app_main(void)
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
} |
Thank you. |
Environment
git describe --tags
in $IDF_PATH folder to find it):v5.1.2
git describe --tags
in $ADF_PATH folder to find it):v2.6-86-g1a03fe6a
xtensa-esp32-elf-gcc --version
in your project folder to find it):xtensa-esp32s3-elf-gcc.exe (crosstool-NG esp-12.2.0_20230208) 12.2.0
Problem Description
Hi.
I'm out of options and desperately need some help.
Maybe somebody had this problem before. Basically, I'm just trying to use the Espressif's Audio Forge example(https://github.com/espressif/esp-adf/blob/master/examples/audio_processing/pipeline_audio_forge/main/audio_forge_pipeline_main.c) from ESP-ADF repository and compile it for my custom ESP32-S3 board. Everything works, and I CAN HEAR sound from the speaker when I
#define NUMBER_SOURCE_FILE 1
,but it's showing me the
"AUDIO_ELEMENT: [audio_forge] Read IO type ringbuf but ringbuf not set"
when I
#define NUMBER_SOURCE_FILE 2
.The modification I've done was to add
for (int i = 0; i < NUMBER_SOURCE_FILE; i++) {esp_err_t ret = audio_pipeline_run(pipeline[i]);} audio_pipeline_run(pipeline_mix);
before
while (1) {}
to start the audio pipeline because I don't have a board with the buttons and use MP3 instead of WAV.This is my console output:
Expected Behavior
I should hear 2 sounds simultaneously.
Actual Behavior
E (1546) AUDIO_ELEMENT: [audio_forge] Read IO type ringbuf but ringbuf not set
And silence...
Steps to Reproduce
I (856) main_task: Calling app_main()
I (856) gpio: GPIO[46]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (856) DS1302: [1.0] Start audio codec chip
I (866) DRV8311: ES8311 in Slave mode
I (876) gpio: GPIO[46]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (926) AUDIO_HAL: Codec mode is 2, Ctrl:1
I (926) DS1302: [2.0] Start and wait for SDCARD to mount
I (926) SDCARD: Using 1-line SD mode, base path=/sdcard
I (926) gpio: GPIO[40]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (936) gpio: GPIO[41]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (936) gpio: GPIO[42]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (936) AUDIO_THREAD: The esp_periph task allocate stack on internal memory
I (986) SDCARD: CID name SA4GB!
I (1436) DS1302: [3.0] Create pipeline_mix to mix
I (1436) DS1302: [3.1] Create audio_forge
I (1436) DS1302: [3.2] Create i2s stream to read audio data from codec chip
I (1436) DS1302: [3.3] Link elements together audio_forge-->i2s_writer
I (1436) DS1302: [3.4] Link elements together audio_forge-->i2s_stream-->[codec_chip]
I (1436) DS1302: [4.0] Create Fatfs stream to read input data
I (1436) DS1302: [4.1] Create wav decoder to decode wav file
I (1436) DS1302: [4.2] Create raw stream of base wav to write data
I (1436) DS1302: [5.0] Set up event listener
I (1436) MP3_DECODER: MP3 init
I (1436) AUDIO_PIPELINE: link el->rb, el:0x3c077d78, tag:file, rb:0x3c0781b0
I (1436) AUDIO_PIPELINE: link el->rb, el:0x3c077f10, tag:wav, rb:0x3c07a1f8
I (1436) MP3_DECODER: MP3 init
I (1436) AUDIO_PIPELINE: link el->rb, el:0x3c07aaa8, tag:file, rb:0x3c07aee0
I (1446) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3
I (1446) gpio: GPIO[1]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3
I (1446) AUDIO_PIPELINE: link el->rb, el:0x3c07ac40, tag:wav, rb:0x3c07cf28
I (1446) DS1302: [5.1] Listening event from peripherals
I (1446) AUDIO_THREAD: The file task allocate stack on internal memory
I (1446) AUDIO_ELEMENT: [file-0x3c077d78] Element task created
I (1446) AUDIO_THREAD: The wav task allocate stack on external memory
I (1446) AUDIO_ELEMENT: [wav-0x3c077f10] Element task created
I (1446) AUDIO_ELEMENT: [raw-0x3c078040] Element task created
I (1446) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:8634896 Bytes, Inter:340923 Bytes, Dram:340923 Bytes
I (1446) AUDIO_ELEMENT: [file] AEL_MSG_CMD_RESUME,state:1
I (1446) AUDIO_ELEMENT: [wav] AEL_MSG_CMD_RESUME,state:1
I (1446) MP3_DECODER: MP3 opened
I (1446) FATFS_STREAM: File size: 767885 byte, file position: 0
I (1446) AUDIO_PIPELINE: Pipeline started
I (1446) AUDIO_THREAD: The file task allocate stack on internal memory
I (1446) AUDIO_ELEMENT: [file-0x3c07aaa8] Element task created
I (1446) AUDIO_THREAD: The wav task allocate stack on external memory
I (1456) AUDIO_ELEMENT: [wav-0x3c07ac40] Element task created
I (1456) AUDIO_ELEMENT: [raw-0x3c07ad70] Element task created
I (1456) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:8618684 Bytes, Inter:335531 Bytes, Dram:335531 Bytes
I (1456) AUDIO_ELEMENT: [file] AEL_MSG_CMD_RESUME,state:1
I (1456) AUDIO_ELEMENT: [wav] AEL_MSG_CMD_RESUME,state:1
I (1456) MP3_DECODER: MP3 opened
I (1456) AUDIO_PIPELINE: Pipeline started
I (1456) AUDIO_THREAD: The audio_forge task allocate stack on external memory
I (1456) CODEC_ELEMENT_HELPER: The element is 0x3c077f10. The reserve data 2 is 0x0.
I (1466) AUDIO_ELEMENT: [audio_forge-0x3c0775e8] Element task created
I (1466) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:8575400 Bytes, Inter:335703 Bytes, Dram:335703 Bytes
I (1466) AUDIO_ELEMENT: [audio_forge] AEL_MSG_CMD_RESUME,state:1
I (1466) AUDIO_FORGE: audio_forge opened
I (1466) AUDIO_PIPELINE: Pipeline started
W (1466) DS1302: [ * ] Receive music info from wav decoder, sample_rates=44100, bits=16, ch=1
I (1476) FATFS_STREAM: File size: 736584 byte, file position: 0
I (1486) CODEC_ELEMENT_HELPER: The element is 0x3c07ac40. The reserve data 2 is 0x0.
W (1526) DS1302: [ * ] Receive music info from wav decoder, sample_rates=44100, bits=16, ch=1
E (1546) AUDIO_ELEMENT: [audio_forge] Read IO type ringbuf but ringbuf not set
I (1546) AUDIO_FORGE: audio forge closed
I (1546) DS1302: [6.0] Stop pipelines
W (1546) AUDIO_ELEMENT: OUT-[wav] AEL_IO_ABORT
W (1546) MP3_DECODER: Output aborted -3
I (1546) MP3_DECODER: Closed
W (1546) AUDIO_ELEMENT: OUT-[file] AEL_IO_ABORT
W (1556) AUDIO_ELEMENT: OUT-[wav] AEL_IO_ABORT
W (1556) MP3_DECODER: Output aborted -3
I (1556) MP3_DECODER: Closed
W (1556) AUDIO_ELEMENT: OUT-[file] AEL_IO_ABORT
W (1556) AUDIO_ELEMENT: [audio_forge] Element already stopped
W (1556) AUDIO_PIPELINE: There are no listener registered
I (1556) AUDIO_PIPELINE: audio_pipeline_unlinked
W (1556) AUDIO_ELEMENT: [file] Element has not create when AUDIO_ELEMENT_TERMINATE
W (1556) AUDIO_ELEMENT: [wav] Element has not create when AUDIO_ELEMENT_TERMINATE
W (1556) AUDIO_ELEMENT: [raw] Element has not create when AUDIO_ELEMENT_TERMINATE
W (1556) AUDIO_PIPELINE: There are no listener registered
I (1556) AUDIO_PIPELINE: audio_pipeline_unlinked
W (1556) AUDIO_ELEMENT: [file] Element has not create when AUDIO_ELEMENT_TERMINATE
W (1556) AUDIO_ELEMENT: [wav] Element has not create when AUDIO_ELEMENT_TERMINATE
W (1556) AUDIO_ELEMENT: [raw] Element has not create when AUDIO_ELEMENT_TERMINATE
W (1556) AUDIO_PIPELINE: There are no listener registered
I (1556) AUDIO_PIPELINE: audio_pipeline_unlinked
W (1556) AUDIO_ELEMENT: [audio_forge] Element has not create when AUDIO_ELEMENT_TERMINATE
I (1556) AUDIO_FORGE: audio_forge_destroy
I (1556) AUDIO_FORGE: Func:audio_forge_destroy, Line:406, MEM Total:8674748 Bytes, Inter:349959 Bytes, Dram:349959 Bytes
W (1556) AUDIO_ELEMENT: [iis] Element has not create when AUDIO_ELEMENT_TERMINATE
The text was updated successfully, but these errors were encountered: