简体   繁体   English

如何使用C ++用Lame将24位WAV转换为mp3

[英]How to convert 24-bit wav to mp3 with Lame using C++

I am using the Lame library in a C++ application to encode wav files to mp3 files. 我在C ++应用程序中使用Lame库将wav文件编码为mp3文件。

It works ok for 16-bit wavs, but now I need to convert some 24-bit wavs and I cannot seem to find the way. 它对于16位wavs可以正常工作,但是现在我需要转换一些24位wavs,我似乎找不到办法。 In particular, I cannot find a function for setting the "bitwidth" parameter taken as a switch by the lame command line. 特别是,我找不到用于设置由lame命令行用作开关的“ bitwidth”参数的函数。 (The command line executable does convert 24-bit wavs correctly when setting "bitwidth" to 24, so I think it must be possible.) (将“ bitwidth”设置为24时,命令行可执行文件确实可以正确转换24位wav,因此我认为这是有可能的。)

Thank you in advance for any hint! 预先感谢您的任何提示!

The command line executable does convert 24-bit wavs correctly when setting "bitwidth" to 24, so I think it must be possible 将“位宽”设置为24时,命令行可执行文件确实可以正确转换24位wav,因此我认为这一定是可能的

Perhaps the solution then is to look at the source-code for the command line utility, or even step it in your debugger and see how it does it. 然后,解决方案可能是查看命令行实用程序的源代码 ,或者甚至将其放在调试器中并查看工作方式。

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

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