Wav files support different encodings, including mp3. Is there a C/C++ library that would produce mp3-encoded wav files from uncompressed wav? If not, what would be the best place to start to implement one?
Unfortunately LAME produces MP3s in a MPEG container, not a RIFF container.
Ignacio Vazquez-Abrams
2010-03-11 16:06:20
This is the first place I checked, thanks. It does not seem to be able to create wav files, like Ignacio said.
Don Reba
2010-03-11 20:49:00
A:
The best way indead to use Lame (if you do not afraid patent issues). You can use the both sources for lame and lame_enc.dll. Using the lame_enc.dll is more easier. As for RIFF-WAV container: it is simply to create RIFF-WAV files according to RIFF-WAV specification.
There are another possibilities. For example using ACM codecs.
But in any case you should be capable to prepend sound stream with RIFF-WAV header. This can be done manaully (I think the simplest way) or by using some free library (it seems libsnd is capable to do this).
VitalyVal
2010-03-12 22:04:34
You sould distinguish support of audio stream format and file types (containers). There is no need to use allinone tool for producing RIFF-WAV MP3 files. You need: 1) a MP3 encoding engine (lame, ACM codec, DirectShow filter); 2) ability to add RIFF-WAV header to MP3 stream. For item 2 you can start from converting pure MP3 files to RIFF-WAV MP3 files.See:MPEGLAYER3WAVEFORMAT (MSDN)RIFF-WAV specification (e.g. http://www.sonicspot.com/guide/wavefiles.html)http://a-gamyl.hp.infoseek.co.jp/Clang/dgwriff/driff.cpphttp://www.koders.com/cpp/fid1163D7D7C554A5DD192C098EE9918D8B8AD8C618.aspx
VitalyVal
2010-03-13 12:21:40