Open hajimehoshi opened 6 years ago
would switching mean use cgo?
I'd like to avoid using cgo, then no. Porting this to Go might be an option, but not decided yet.
I just tested both implementation for a project running on RaspberryPi zero, on this platform the CPU usage is an important aspect:
Source mp3: 256kbps 44khz stereo
I just tested both implementation for a project running on RaspberryPi zero, on this platform the CPU usage is an important aspect:
- minimp3 -> ~35% of CPU
- go-mp3 -> ~75% of CPU
Source mp3: 256kbps 44khz stereo
What about the speed? Read a mp3 file and save them to a pcm file.
What about the speed? Read a mp3 file and save them to a pcm file.
An implementation using less CPU on a streaming load should always be faster in the task overall when scaling to "full throttle", i.e. to 100 % CPU.
Same variables, different perspective (speed and CPU usage are inherently related).
https://github.com/lieff/minimp3
It looks like minimp3 is cleaner, faster and well tested. It is only about 1700 lines and switching to it is not so hard.