I’ve written not one, but two mp3 decoders for juce.
-
FFmpegAudioFormat is based on FFmpeg and it supports all the audio formats of FFmpeg. It is inefficient as it decodes the entire audio file in the constructor to determine the length, and then decodes it again in the read() function. Also for some formats it requires a FileInputStream rather than just an InputStream.
-
MP3AudioFormat is based on a slightly modified mpadec, which is based on mpg123. It is smart enough to determine length without decoding, but I don’t know how accurate this is for VBR files. mpadec is a lot smaller than FFmpeg, so this is the one to use if you just need mp3.
FFmpeg & mpadec are both LGPL, but you will still be required to pay mp3 licensing royalties if you distribute an app that decodes mp3.
I have only done Windows builds, mac and linux should be trivial.
Neither support id3 tags, anybody want to take a look into that?