Mr_*_*r_P 5 ios swift audiokit
我一直在使用Audiokit.stop(),效果不错,还有一些我现在想解决的小问题。随着最近对 Audiokit 4.2 的更新,我现在从以下代码中收到(非常有用的)错误消息:
do {
try AudioKit.stop()
} catch {
AKLog("AudioKit did not stop!")
}
Run Code Online (Sandbox Code Playgroud)
我的错误代码是这样的:
2018-04-24 16:14:48.099606+0100 MyProject[517:62626] [avas] AVAudioSession.mm:1142:
-[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has
running I/O. All I/O should be stopped or paused prior to deactivating the audio session.
AudioKit.swift:stop():299:couldn't stop session
Error Domain=NSOSStatusErrorDomain Code=560030580 "(null)"
GameScene.swift:update:755:AudioKit did not stop!
Run Code Online (Sandbox Code Playgroud)
所以我的问题是 - 如何按照错误消息的建议正确停止或暂停所有输入和输出(I/O)?