#3
in
Express
As others have pointed out, you don't need to write extra .c files, and you won't bloat the obj files. This paradigm is fairly common, see, e.g.:
https://github.com/lieff/minimp3
https://github.com/Immediate-Mode-UI/Nuklear
https://github.com/mattiasgustavsson/libs/blob/main/docs/htt...
And for the other direction, there's minimp3: https://github.com/lieff/minimp3
I've used minimp3 to implement a MP3 player on a STM32 microcontroller. Works great -- it has no problem playing a 256kbps file at 80 MHz. :)
An MP3 decoder is actually relatively tiny: https://github.com/lieff/minimp3 shows that it can be done in ~30KB of code. It's everything else around the player, such as the UI, that takes up the bulk of the size.
He also recommends checking this one that is a clean re implementation, not the extraction of FFmpeg code:
https://github.com/lieff/minimp3