Recording mp3 on iPhone by SDK

谁说我不能喝 提交于 2020-01-01 10:53:33

问题


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?


回答1:


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.




回答2:


The iPhone SDK doesn't support MP3 encoding. It does support hardware AAC/m4a encoding which is in many ways superior to mp3.




回答3:


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



来源:https://stackoverflow.com/questions/6271184/recording-mp3-on-iphone-by-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!