2012-09-15 65 views
1

在使用AVFoundation在iPhone模拟器中录制音频时,出现以下错误。我的代码在设备上正常工作。在iPhone模拟器中录制音频时出错

任何想法?提前致谢。

2012年9月15日17:51:39.592 MySpellings [538:3503]错误加载 /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: 的dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262):符号未找到:__ CFObjCIsCollectable从参考: /系统/库/框架/ Security.framework/Versions/A/Security
预计于: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Libra ry/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-09-15 17:51:39.598 MySpellings [538:3503] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262):找不到符号:_
_CFObjCIsCollectable从引用: /System/Library/Frameworks/Security.framework/Versions/A/Security
预计于: /Applications/Xcode.app/Contents/Developer/Platforms/ iPhoneSimulator.platform /开发商/软件开发工具包/ iPhoneSimulator5.1.sdk/S ystem/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-09-15 17:51:39.607 MySpellings [538:3503] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHluPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/ AppleHDAHALPlugIn, 262):找不到符号:__ CFObjCIsCollectable从引用: /System/Library/Frameworks/Security.framework/Versions/A/Security
预计于: /Applications/Xcode.app/Contents/Developer/平台/ iPhoneSimulator.platform /开发商/软件开发工具包/ iPhoneSimulator5 .1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-09-15 17:51:39.612 MySpellings [538:3503 ] Error Loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn: dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle) /内容/ MacOS的/ AppleHDAHALPlugIn, 262):找不到符号: /System/Library/Frameworks/Security.framework/Versions/A/Security
预期: /Applications/Xcode.app _
_CFObjCIsCollectable从引用/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhon /System/Library/Frameworks/Security.framework/Versions/A/Security 2012-09-15 17:51:40.932 MySpellings [538: 4907] aq @ 0xea13200: ConvertInput:AudioConverterFillComplexBuffer返回560226676, packetCount 21 2012-09-15 17:51:42.254 MySpellings [538:c07] flushing 等待输入终止 - 错误'!dat'

+0

可能重复的[prepareToRecord崩溃](http://stackoverflow.com/questions/10719758/preparetorecord-crashing) – matt

+0

愚蠢的不确定,我的应用程序没有崩溃,并显示不同的错误。 – nicktones

+0

这只是一个模拟器问题。不用担心... – Macmade

回答

-1

我还记录音频模拟器录音时m4a格式(AVFormatIDKey = kAudioFormatMPEG4AAC)时出现问题。没有录制音频,控制台日志包含“AudioConverterFillComplexBuffer”错误。

但是,记录到.caf格式(kAudioFormatAppleIMA4)确实有效,这可能是某些人的解决方法。

recordSettings = [NSDictionary 
        dictionaryWithObjectsAndKeys: 
        [NSNumber numberWithInt:AVAudioQualityMin], 
        AVEncoderAudioQualityKey, 
        [NSNumber numberWithInt:16], 
        AVEncoderBitRateKey, 
        [NSNumber numberWithInt: 1], 
        AVNumberOfChannelsKey, 
        [NSNumber numberWithFloat:16000.0], 
        AVSampleRateKey, 
        [NSNumber numberWithInt: kAudioFormatAppleIMA4], 
        AVFormatIDKey, 
        nil]; 
0

在我的情况下表现出的错误,因为我用错码率:

我忘了,我用kbps和AVEncoderBitRateKey使用BPS。 因此,我将比特率乘以1000后,错误消失了。

相关问题