2012-09-15 64 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後,錯誤消失了。

相關問題