简体   繁体   English

WAV文件的MP3编解码器

[英]MP3 codec for WAV files

Wav files support different encodings, including mp3. Wav文件支持不同的编码,包括mp3。 Is there a C/C++ library that would produce mp3-encoded wav files from uncompressed wav? 是否有一个C / C ++库可以从未压缩的WAV中生成mp3编码的WAV文件? If not, what would be the best place to start to implement one? 如果没有,那么开始实施该计划的最佳地点是什么?

您是否检查过: http : //lame.sourceforge.net/

  1. The best way indead to use Lame (if you do not afraid patent issues). 最好的方式是使用Lame(如果您不怕专利问题)。 You can use the both sources for lame and lame_enc.dll. 您可以同时使用lame和lame_enc.dll这两个源。 Using the lame_enc.dll is more easier. 使用lame_enc.dll更容易。 As for RIFF-WAV container: it is simply to create RIFF-WAV files according to RIFF-WAV specification. 对于RIFF-WAV容器:只需根据RIFF-WAV规范创建RIFF-WAV文件。

  2. There are another possibilities. 还有另一种可能性。 For example using ACM codecs. 例如,使用ACM编解码器。

But in any case you should be capable to prepend sound stream with RIFF-WAV header. 但无论如何,您都应该能够在声音流之前添加RIFF-WAV标头。 This can be done manaully (I think the simplest way) or by using some free library (it seems libsnd is capable to do this). 这可以手动完成(我认为是最简单的方法),也可以使用一些免费的库来完成(看来libsnd可以做到这一点)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM