minimp3
minimp3 copied to clipboard
Reduce stack usage to help usage on embedded systems
This is useful to me. It would be nice if it would be merged.
@vmsh0 feel free to use my fork and let me know how it goes. I'm using it here on stm32 targets.
I swapped this in in place of the mainline version, was able to reduce the stack size of my decoder task by more than 20k. Big success! Thanks.
While I would also like to see reduced stack usage, the approach implemented here does not really work:
When using minimp3 in a separate translation unit (i.e. without MINIMP3_IMPLEMENTATION defined), mp3dec_t is now an incomplete type that cannot be used at all, which makes the whole API unusable.
While I would also like to see reduced stack usage, the approach implemented here does not really work: When using minimp3 in a separate translation unit (i.e. without
MINIMP3_IMPLEMENTATIONdefined),mp3dec_tis now an incomplete type that cannot be used at all, which makes the whole API unusable.
The API could be extended to have an "init" method, dynamically allocating a mp3dec_t structure. This would probably benefit from #114