如何去code MP3成C / C使用LAME WAV ++? [英] How to decode mp3 into wav using lame in C/C++?

查看:311
本文介绍了如何去code MP3成C / C使用LAME WAV ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我学会了如何连接code WAV到使用MP3 lame_en code_buffer_interleaved 从这个问题:<一href=\"http://stackoverflow.com/questions/2495420/is-there-any-lame-c-wraper-simplifier-working-on-linux-mac-and-win-from-pure-c\">Is有没有LAME C ++ wraper \\控制简化(纯code在Linux上的Mac和Win工作)?

I learned how to encode wav into an mp3 using lame_encode_buffer_interleaved from this question: Is there any LAME c++ wraper\simplifier (working on Linux Mac and Win from pure code)?

现在我想要去code中的MP3放回WAV。我知道有 lame_de code ,但我不知道如何,因为它需要两个PCM缓冲器( pcm_l pcm_r )。我不知道如何把它们连成一个结构良好的WAV文件,因为我真的不知道他们是如何工作的。

Now I want to decode the mp3 back into wav. I know there's lame_decode but I don't know how to use it since it requires two pcm buffers (pcm_l and pcm_r). I don't understand how to put them together into a well-formed wav file, because I don't really know how they works.

现在有人可以提供使用用C跛脚的MP3解码成WAV一个简单的工作示例/ C ++?

Now can someone provide a simple working example on decoding an mp3 into a wav using lame in C/C++?

感谢。

推荐答案

看看进入跛脚前端源$ C ​​$ C。在开始在 /frontend/lame_main.c 文件中的 lame_de codeR 的功能,它去codeS一个MP3文件,并写入声波头。

Take a look into the lame frontend source code. Start at thelame_decoder function in the /frontend/lame_main.c file, it decodes a mp3 file and write the wave header.

这篇关于如何去code MP3成C / C使用LAME WAV ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆