如何在iPhone上录制除Linear PCM之外的其他内容 [英] How to record something other than Linear PCM on iPhone

查看:109
本文介绍了如何在iPhone上录制除Linear PCM之外的其他内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难在iPhone上录制除线性PCM以外的东西:-(
我找到的样本(SDK的SpeakHere,Zdziarski和Sadun的书以及在trailsinthesand.com上的那些)所有都使用线性PCM,但我喜欢常用的压缩格式(没有ima4或其他任何名字......)。

I'm having a hard time trying to record something other than linear PCM on the iPhone :-( The samples I've found (SDK's SpeakHere, Zdziarski's and Sadun's books and the one at trailsinthesand.com) all use linear PCM but I'd like a commonly used compressed format instead (no ima4 or whatever the name is...).

我只是想不通怎么样调整要使用的示例代码,例如AAC,MP3或AMR。任何有关如何做的建议和提示都非常感谢!

I just cannot figure out how to tweak the sample code to be used with, for example AAC, MP3 or AMR instead. Any suggestions and hints for how to do that are much appreciated!

(顺便说一下,我不要认为MP3编码器和AMR编码器因许可问题而可用,但AAC确实存在,或者???)

(Btw, I do not think an MP3-encoder nor AMR-encoder are available due to licensing issues, but AAC does exist, or???)

编辑/更新: 我偶然发现了Apple的iPhone应用程序编程指南中的以下文字,2009-01-06,第137页,部分:录制音频:

您可以录制任何格式的音频在iPhone OS中的首选音频格式(第140页)中列出,并作为pag上的首选音频格式e 140是:对于一次播放一个声音时的压缩音频,以及当您不需要与iPod应用程序同时播放音频时,请使用CAF或m4a文件中打包的AAC格式。

因此,我将其解释为一个明确的迹象,它确实,不仅可能,甚至更可取,以AAC格式录制包含在m4a文件中的音频,这正是我想要的。但是,我仍然无法做到这一点?!

Edit/Update: I stumbled upon the following text in Apple's "iPhone Application Programming Guide", 2009-01-06, page 137, section: Recording Audio:
"You can record audio in any of the formats listed in "Preferred Audio Formats in iPhone OS" (page 140)", and as preferred audio formats on page 140 are: "For compressed audio when playing one sound at a time, and when you don’t need to play audio simultaneously with the iPod application, use the AAC format packaged in a CAF or m4a file."
Thus, I interpret that as a clear indication that it is indeed, not only possible, but even preferable, to record audio in AAC format wrapped up in a m4a file, which is just what I want. But still, I am not able to achieve that?!

谢谢,
/ John

Thanks, /John

推荐答案

继续关注这些文档。在Core Audio Essentials中,Core Audio Plug-ins:Audio Units and Codecs部分指出:

Keep looking at those docs. In "Core Audio Essentials", the section "Core Audio Plug-ins: Audio Units and Codecs" notes that:


iPhone OS包含记录表2-5中列出的
编解码器。你可以看到
,MP3和AAC录音都不是
。这是由于这些格式的高CPU
开销和随之而来的电池
排放。

iPhone OS contains the recording codecs listed in Table 2-5. As you can see, neither MP3 nor AAC recording is available. This is due to the high CPU overhead, and consequent battery drain, of these formats.

表2-5列出了几种格式,但由于文字说明不包括您要查找的格式。如果您需要这些格式,则必须携带自己的编码器。

Table 2-5 lists several formats, but as the text notes does not include the ones you're looking for. If you want those formats you'll have to bring your own encoder.

这篇关于如何在iPhone上录制除Linear PCM之外的其他内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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