什么是Core Audio错误561015905以及为什么我使用锁定按钮时会发生? [英] What is Core Audio error 561015905 and why does it happen when I use the lock button?

查看:1341
本文介绍了什么是Core Audio错误561015905以及为什么我使用锁定按钮时会发生?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自升级到iOS 10和Xcode 8以来,每当我使用锁定按钮关闭屏幕时,我的iOS应用程序就会抛出错误并崩溃。错误是:

Since upgrading to iOS 10 and Xcode 8, my iOS app has been throwing an error and crashing whenever I turn off the screen using the lock button. The error is:


***由于未捕获的异常'com.apple.coreaudio.avfaudio'终止应用程序,原因:'错误561015905 '

*** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'error 561015905'

我没有明确使用Core Audio或任何音频。但我正在使用SceneKit,我假设使用Core Audio。

I'm not explicitly using Core Audio, or any audio at all. But I am using SceneKit, which I assume uses Core Audio.

实际上这种行为似乎与我的代码根本没有关系。它发生在一个全新的未触动的SceneKit模板上!它不会在模拟器中发生,但它会在iPhone 5上进行测试。我没有尝试过其他型号。

Actually this behavior doesn't seem to be related to my code at all. It happens on a brand new untouched SceneKit template! It doesn't happen in the simulator, but it happens consistently testing with an iPhone 5. I haven't tried it with another model.

重现步骤:
使用带有SceneKit的Game模板在Xcode 8.0中创建一个新项目。在项目编辑器中设置您的团队以进行代码签名。连接iPhone 5进行测试。构建并运行应用程序。一旦它开始(你看到旋转平面),点击锁定按钮。发生错误,应用程序将不会从锁定屏幕返回。

Steps to reproduce: Create a new project in Xcode 8.0 using the "Game" template with SceneKit. Set your team in the project editor for code signing. Connect an iPhone 5 for testing. Build and run the app. Once it starts (and you see the rotating plane), hit the lock button. The error occurs and the app won't return from the lock screen.

Google错误消息的结果似乎都来自实际使用Core Audio或尝试播放的人声音,这里不适用。

Google results for the error message all seem to be from people actually using Core Audio or trying to play sound, which doesn't apply here.

这是什么错误,可以采取什么措施?

What is this error and what can be done about it?

推荐答案

这是一个Apple漏洞,在我们等待iOS 10.2中的修复时有2个解决方法:

This is an Apple bug that has 2 workarounds while we wait for the fix in iOS 10.2:

(1)(更差) )启用背景音频

(1) (worse) enable background audio

(2)(更好)查看Apple消息

(2) (better) see Apple message below

来自Apple的消息:
这是一个已知问题,将在10.2中修复。与此同时,另一个更简单的解决方法应该可以工作:
在进入后台之前触发音频引擎创建(例如在安装时)。
你可以通过从SCNView获取音频引擎来触发:

message from Apple: This is a known issue that will be fixed in 10.2. In the meantime another simpler workaround should work: Trigger the audio engine creation yourself before entering the background (for example at setup). You can trigger this simply by getting the audio engine from the SCNView:

scnView.audioEngine;

scnView.audioEngine;

这篇关于什么是Core Audio错误561015905以及为什么我使用锁定按钮时会发生?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆