Page 1 of 1

MP3_DECODER: reduce buffer size

Posted: Fri Aug 20, 2021 4:00 pm
by fraschizzato
There's a way to reduce the decoder buffer size? At any try I always get that 27796 bytes are needed.

Code: Select all

MP3_DECODER: Allocate decoder buffer failed. bytes 27796,
Now I'm trying to modify that config vars but without success.

Code: Select all

#define MY_MP3_DECODER_TASK_STACK_SIZE     (5 * 1024)
#define MY_MP3_DECODER_TASK_CORE           (0)
#define MY_MP3_DECODER_TASK_PRIO           (5)
#define MY_MP3_DECODER_RINGBUFFER_SIZE     (2 * 1024)

#define MP3_DECODER_CONFIG() {                  \
    .out_rb_size        = MP3_DECODER_RINGBUFFER_SIZE,  \
    .task_stack         = MY_MP3_DECODER_TASK_STACK_SIZE,  \
    .task_core          = MP3_DECODER_TASK_CORE,        \
    .task_prio          = MP3_DECODER_TASK_PRIO,        \
    .stack_in_ext       = true,                         \
}
I'm using the pipeline_bt_source (https://github.com/espressif/esp-adf/tr ... _bt_source) on a ESP_devkit_v4 (ESP32-WROOM-32U), any idea on ho to get it work?
Thanks

Re: MP3_DECODER: reduce buffer size

Posted: Sun Aug 22, 2021 5:24 pm
by kentavr
Have you tried:

.stack_in_ext = false

?

Re: MP3_DECODER: reduce buffer size

Posted: Tue Aug 24, 2021 8:14 am
by fraschizzato
Yes, same result. At this time I can't find where to reduce the requested 27796 bytes.
Thanks

Re: MP3_DECODER: reduce buffer size

Posted: Wed Aug 25, 2021 10:26 am
by kentavr
You should re-check board requirements at the link you provided. Probably, this example is for WROVER based boards having external memory.

Re: MP3_DECODER: reduce buffer size

Posted: Thu Aug 26, 2021 4:51 pm
by fraschizzato
I know that my board doesn't meet the requirements, for the use I was planning the actual limit is memory size for buffer. The question is if the decoder buffer (or probably of the pipeline) is resizable. Didn't find where the 27796 bytes value comes from. If I can reduce to half that size I can probably achieve the result.
Thanks