执行" AudioKit.start()"时,错误发生

时间:2018-03-15 02:54:06

标签: swift audiokit

我已经推出了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!'

0 个答案:

没有答案