从PCM转换为WAV.是否有可能? [英] Convert from PCM to WAV. Is it Possible?

查看:126
本文介绍了从PCM转换为WAV.是否有可能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iPAD申请. 此应用程序记录麦克风的声音. 项目的音频格式必须是PCM,MP3和WAV文件.我从原始原始文件中获取了MP3文件,然后使用LAME进行了转换. 不幸的是,我还没有找到任何可以将PCM文件转换为WAV文件的示例. 我只是注意到,如果将文件扩展名设置为WAV格式,则从原始应用程序开始保存不会出现问题,因此我认为PCM WAV文件没有类型转换. 正确吗?

I have an application for iPAD. This application records the voice of the microphone. The audio formats of the item must be PCM, MP3 and WAV files. The MP3 file I get it starting from the original raw file and then convert using LAME. Unfortunately I have not found any example that allows me to convert a PCM file to a WAV file. I just noticed that if I put the file extension to WAV format, starting from the raw application saves without problems, so I think that there is no type conversion from PCM WAV files. Correct?

PS:对不起,我的英语...我使用Google翻译

PS: Sorry for my english ... I use Google Translate

推荐答案

WAV是一种盒子. PCM在包装盒中.有许多容器格式,例如MP4. MP4可以包含音频,视频或两者.它还可以包含多个视频或音频流.或zip文件.压缩文件可以包含文本文件.但是zip文件还可以包含图像,pdf等.但是您不能说如何将zip文件转换为zip内的文本文件".

WAV is some kind of a box. PCM is in the box. There are many container formats like MP4. MP4 can contain audio, video or both. It can also contain multiple video or audio streams. Or zip files. Zip files can contain text files. But zip files can also contain images, pdfs,... But you can't say "how can I convert a zip file to the text file inside the zip".

如果要将PCM数据转换为WAVE文件,则应该没有很多问题,因为WAV文件是非常简单的文件.看看这个:

If you want to convert PCM data to a WAVE file you should not many problems because WAV files are quite simple files. Take a look at this:

(另请参见 WAVE PCM声音文件格式.)

首先需要该标头,然后可以附加所有pcm数据(请参见数据字段).

You first need that header and after you can just append all your pcm data (see the data field).

这篇关于从PCM转换为WAV.是否有可能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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