tags:

views:

64

answers:

2

I'm looking for an easy to use lib that will convert an MP3 file to a sequence of int values (and the reverse), preferable without having to dump them all into RAM. A "decode the next 16kB into this buffer" like API would be ideal.

I need C or simple C++ bindings.

A MP3<->RAW filter CLI tool would work but I'd rather not have to keep uncompressed files on disk.

+2  A: 

Try libmad or ffmpeg's libavcodec. Both should meet your requirements. The ancient mp3lib which was originally derived from/part of (?) mpg123 has also been resurrected in mplayer with new development and perhaps has the best performance, but probably the ugliest code. :-)

R..
Looking... Do you by chance happen to know of some good tutorials? If you don't I'll muddle through but I'd rather not.
BCS
A: 

I created a .net wrapper for mpg123 for use in my projects, and posted it to soundforge.

It is here.

http://sourceforge.net/projects/mpg123net/

So you say you need it for c/c++ - ok, i posted it so you can check out my sample, that has so little code that is enough for initializing decoder and putting it to work for you.

Daniel Mošmondor