我已经推出了RecordView控制器,它通过来自homeViewController(一个emptyViewController)的AudioKit来录制音频,我在APPDelegate.swift中编写代码如下:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:[UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool {
do {
try AVAudioSession.sharedInstance().setActive(true)
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
}catch{
}
UIApplication.shared.beginReceivingRemoteControlEvents()
return true
}
然后当它推送到recordViewController时,显示此消息
'[AVAudioEngineGraph.mm:1266:Initialize: (err = AUGraphParser::InitializeActiveNodesInOutputChain(ThisGraph, kOutputChainOptimizedTraversal, *GetOutputNode(), isOutputChainActive)): error -10875, RecorderViewController.swift:stetupConfigs():89:AudioKit did not start!'