录音机只能在iPhone 3GS上使用,而不能在iPhone 3G上使用 [英] recorder works on iPhone 3GS but not on iPhone 3G

查看:93
本文介绍了录音机只能在iPhone 3GS上使用,而不能在iPhone 3G上使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个AVAudioRecorder,它的初始化方式如下:

I have a AVAudioRecorder, which gets initialized like:

_recorder = [AVAudioRecorder alloc];
NSMutableDictionary *recordSettings = [[[NSMutableDictionary alloc] initWithCapacity:2] autorelease];
[recordSettings setObject:[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey: AVFormatIDKey];
[recordSettings setObject:[NSNumber numberWithInt:AVAudioQualityLow] forKey: AVEncoderAudioQualityKey]; 
NSURL *url = [NSURL fileURLWithPath:[self getActualSoundPath]];
[_recorder initWithURL:url settings:recordSettings  error:nil];    
[_recorder setDelegate:self];

此代码可在我的模拟器和iPhone 3GS上完美运行,但在较旧的iPhone 3G上则无法正常运行...

This code works perfectly in my Simulator and on my iPhone 3GS but not on the older iPhone 3G...

那是什么问题?

谢谢 马库斯

推荐答案

iPhone 3G不支持像3GS/4/4S这样的硬件AAC编码.您可以使用线性PCM,但这并没有被压缩.

The iPhone 3G doesnt have support for hardware AAC encoding like the 3GS/4/4S. You could use linear PCM, but thats not compressed.

有关支持的格式,请参见此线程:如何我在iPhone上录制了AMR音频格式?

See this thread for supported formats: How can I record AMR audio format on the iPhone?

苹果无损(kAudioFormatAppleLossless)和iLBC(kAudioFormatiLBC)在iPhone 3G上似乎运行良好.

Apple lossless (kAudioFormatAppleLossless) and iLBC (kAudioFormatiLBC) seems to work fine on the iPhone 3G.

kAudioFormatAppleIMA4,但移动Safari无法识别它.

kAudioFormatAppleIMA4 is recommended to use, but its not recognized by mobile Safari.

/马库斯

这篇关于录音机只能在iPhone 3GS上使用,而不能在iPhone 3G上使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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