DSPRelated.com
Forums

Extract mp3 audio data

Started by yoshita nanda June 15, 2005
Hi all,

does anyone know about any freely available library in C++ to obtain mp3
data stream? I am working for a project on audio classification and mp3
data is stream is required. I am working on windows platform.

Regards 
Yoshita nanda

		
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
Hi,

If the mp3 data is in a file then it's quite simple..

<snip>
int c;
FILE* file = fopen ("mp3file.mp3", "rb");
while (!feof(file)) {
  c = fgetc(file);

  /* do something with c here */
}
</snip>

Look in the recent thread on image encryption and follow the URL I
posted.  I believe that it contains a bunch of information that will
help you.

A

Whoops, my bad.  I didn't realise I'd clicked out of
sci.image.processing   I should have said "...look in
sci.image-processing for a recent image encryption thread and follow
the link I posted..."

There are a few things that will give you MP3 streams, but you don't
give us much to go on.  Try Google.  That always helps.  You should
find MAD and Lame as a bare minimum.  What are you trying to achieve?
Do you have files on disk or do you need to get the data from a
soundcard first?  Why would you want mp3 to classify a data stream?
Wouldn't the raw data be more useful?

A