How to record an audio file in .mp3 format?

╄→гoц情女王★ 提交于 2019-11-28 09:23:18
raaz

The Problem is kAudioFormatMPEGLayer3 which is not supported by AVAudioRecorder.

Alternatively you can use kAudioFormatAppleIMA4 for your recording purpose.

Finally you can write your own encoding logic to convert kAudioFormatAppleIMA4 in to MP3 Format.

The other supported encoding for Recording purpose are

kAudioFormatMPEG4AAC   
kAudioFormatAppleLossless  
kAudioFormatAppleIMA4   
kAudioFormatiLBC 
kAudioFormatULaw 
kAudioFormatLinearPCM 

For more info you can refer to this post of SO.

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