| Re: Questions of RAW audio files |
|
 |
|
 |
|
 |
|
 |
Group: microsoft.public.win32.programmer.directx.audio · Group Profile
Author: Alessandro AngeliAlessandro Angeli Date: Aug 26, 2008 13:47
From: "dh"
> Alessandro, I'm interesting in your solution. However, I
> don't think you meant just read in a raw file byte by
> byte and dump it to a MP3 compressor, since the latter
> may not know how to parse the byte stream...
That is exactly what I meant: you tell the compressor what
the input format is (you need to somehow know, no compressor
I know of can guess the format of a PCM stream) and what
output format you want and you feed it blocks of PCM data,
getting blocks of MP3 data which you can simply dump to disk
(an MP3 file is a raw MP3 stream).
> Can you recommend a MP3 compressor for the above purpose?
WindowsMediaPlayer v9-v11 includes the FhG codec (but it
doesn't work anymore starting with Vista). LAME is a great
LGPLed encoder and another one should be included in
libavcodec (ffmpeg). Then there are a bunch of commercial
ones. Each has its own API, but they all basically work in
the same way: specify the input format, then the output
format, then push the PCM data block by block and retrieve
the MP3 data.
|