BCS
BCS

Reputation: 78683

decode an mp3 to a stream of ints

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.

Upvotes: 2

Views: 2298

Answers (2)

Daniel Mošmondor
Daniel Mošmondor

Reputation: 19976

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

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.

Upvotes: 0

R.. GitHub STOP HELPING ICE
R.. GitHub STOP HELPING ICE

Reputation: 215547

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. :-)

Upvotes: 4

Related Questions