MP3_DECODER: reduce buffer size

fraschizzato
Posts: 6
Joined: Wed Aug 18, 2021 9:00 pm

MP3_DECODER: reduce buffer size

Postby fraschizzato » Fri Aug 20, 2021 4:00 pm

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

kentavr
Posts: 25
Joined: Fri Nov 08, 2019 2:39 pm

Re: MP3_DECODER: reduce buffer size

Postby kentavr » Sun Aug 22, 2021 5:24 pm

Have you tried:

.stack_in_ext = false

?

fraschizzato
Posts: 6
Joined: Wed Aug 18, 2021 9:00 pm

Re: MP3_DECODER: reduce buffer size

Postby fraschizzato » Tue Aug 24, 2021 8:14 am

Yes, same result. At this time I can't find where to reduce the requested 27796 bytes.
Thanks

kentavr
Posts: 25
Joined: Fri Nov 08, 2019 2:39 pm

Re: MP3_DECODER: reduce buffer size

Postby kentavr » Wed Aug 25, 2021 10:26 am

You should re-check board requirements at the link you provided. Probably, this example is for WROVER based boards having external memory.

fraschizzato
Posts: 6
Joined: Wed Aug 18, 2021 9:00 pm

Re: MP3_DECODER: reduce buffer size

Postby fraschizzato » Thu Aug 26, 2021 4:51 pm

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

Who is online

Users browsing this forum: No registered users and 24 guests