通过SDK在iPhone上录制mp3
我想知道是否可以使用 Xcode 以编程方式录制 mp3 格式的音频文件。
我阅读了大量文档,并用谷歌搜索了此内容,但没有结果。
请帮忙,如果有人知道这怎么可能?
I'm wondering if it's possible to record an audio file in mp3 format programmatically with Xcode.
I've read a tons of documentations and I've googled for this, but no result.
Please help, if someone knows how this is possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
iPhone SDK不支持MP3编码。它确实支持硬件 AAC/m4a 编码,这在很多方面都优于 mp3。
The iPhone SDK doesn't support MP3 encoding. It does support hardware AAC/m4a encoding which is in many ways superior to mp3.
从 iPhone 3GS 和 iPod touch(第 2 代)的 iOS 3.1 以及 iPad 的 iOS 3.2 开始支持 AAC/m4a 硬件编码。
看一下这里:
http://developer .apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html
AAC/m4a hardware encoding is supported starting in iOS 3.1 for iPhone 3GS and iPod touch (2nd generation) and in iOS 3.2 for iPad.
Take a look here:
http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html
我将从这里开始
http://developer.apple.com/ Library/ios/#referencelibrary/GettingStarted/GS_AudioVideo_iPhone/_index.html,
尝试录制一些原始声音文件,然后使用一些将其转换为 mp3第三方库,如 LAME。
您可以在这里获取 LAME 源代码:
http://lame.sourceforge.net/
尝试构建一个静态库iOS/armv6,实际上我几分钟前就成功构建了它,但我太累了,无法尝试它是否真的有效:)可能没有简单的方法可以做到这一点,希望这对您的搜索有所帮助。我将在接下来的几天内尝试 LAME,并通知您。
I would start here
http://developer.apple.com/library/ios/#referencelibrary/GettingStarted/GS_AudioVideo_iPhone/_index.html,
try to record some raw sound file and then convert it to mp3 with some 3rd party library like LAME.
You can pick up LAME source here:
http://lame.sourceforge.net/
Try building a static library for iOS / armv6, I actually managed to build it couple of minutes ago, but I'm too tired to try if it actually works :) There is probably no easy way to do this, hope this helps in your search. I will try LAME in the next couple of days and let you know however.