如何使用AvAudiorecorder将音频录制为mp3文件 [英] how to record audio as mp3 file by using AvAudiorecorder
本文介绍了如何使用AvAudiorecorder将音频录制为mp3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用AvAudiorecorder.im将音频录制为mp3文件,使用以下代码进行录音设置
how to record audio as mp3 file by using AvAudiorecorder.i m using following code for recorder setting
recordSetting1 = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:AVAudioQualityMin],AVEncoderAudioQualityKey,
[NSNumber numberWithInt:16],
AVEncoderBitRateKey,
[NSNumber numberWithInt: 2],
AVNumberOfChannelsKey,
[NSNumber numberWithFloat:44100.0],
AVSampleRateKey,nil];
推荐答案
添加
[NSNumber numberWithInt:kAudioFormatMPEGLayer3] forKey:AVFormatIDKey
然而,由于版税,在iPhone上编码mp3格式是不可能的。
However it's impossible to encode mp3 format at IPhone because of royalty.
这篇关于如何使用AvAudiorecorder将音频录制为mp3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文