gpt4 book ai didi

ios - AVAudioEngineGraph.mm :1344:Initialize: (err = PerformCommand(*outputNode, kAUInitialize,NULL,0)):错误-10851

转载 作者:行者123 更新时间:2023-11-29 05:22:47 25 4
gpt4 key购买 nike

我无法在虚拟机上运行 iOS 13 应用,并获取此 Xcode 日志:

MyApp[3272:16579] [ddagg]        AggregateDevice.mm:776   couldn't get default input device, ID = 0, err = 0!
MyApp[3272:16579] [ddagg] AggregateDevice.mm:776 couldn't get default output device, ID = 0, err = 0!
MyApp[3272:16579] AudioDeviceStop: no device with given ID
MyApp[3272:16579] [aqme] AQMEIO.cpp:320:_FindIOUnit: error -66680 finding/initializing AQDefaultDevice
MyApp[3272:16377] [aurioc] AURemoteIO.cpp:1086:Initialize: failed: -10851 (enable 2, outf< 2 ch, 0 Hz, Int16, inter> inf< 2 ch, 0 Hz, Int16, inter>)
MyApp[3272:16507] [aqme] AQMEIO.cpp:320:_FindIOUnit: error -66680 finding/initializing AQDefaultDevice
MyApp[3272:16377] [aurioc] AURemoteIO.cpp:1086:Initialize: failed: -10851 (enable 2, outf< 2 ch, 44100 Hz, Float32, non-inter> inf< 2 ch, 0 Hz, Int16, inter>)
MyApp[3272:16377] [avae] AVAEInternal.h:109 [AVAudioEngineGraph.mm:1344:Initialize: (err = PerformCommand(*outputNode, kAUInitialize, NULL, 0)): error -10851

使用 Xcode 11.1、macOS 10.14.6

当我在连接节点后调用 AVAudioEngine 实例上的 start 时,会发生此错误:

engine.attach(musicPlayer)
engine.attach(reverbNode)
engine.attach(mixerNode)
engine.connect(mixerNode, to: reverbNode, format: nil)
engine.connect(reverbNode, to: engine.mainMixerNode, format: nil)
try engine.start()

有什么想法吗?

最佳答案

此问题是由虚拟机没有任何音频输入或输出引起的。如果 AVAudioEnginestart 函数找不到音频输入和音频输出设备,则会抛出错误。

Bitrise 通过建议以下内容修复了该问题:

The solution is fortunately pretty simple, you can simply add a virtual audio output device if you need it. There are a few options to do this, probably the easiest is to install soundflower, which is a tool used for manipulating / piping audio between different tools, and it installs and uses a virtual (actually two) audio output to achieve the functionality.

As the virtual audio drivers are installed as part of the soundflower installation, all you have to do is add a Script step to your workflow, any point before you’d use the audio output (can be the very first step of the workflow), with the following content:

set -ex
brew install Caskroom/cask/soundflower
brew install switchaudio-osx
SwitchAudioSource -s "Soundflower (2ch)" -t input
SwitchAudioSource -s "Soundflower (2ch)" -t output

来源:https://discuss.bitrise.io/t/how-to-create-a-virtual-audio-output-device-on-mac-os-stacks/1119

关于ios - AVAudioEngineGraph.mm :1344:Initialize: (err = PerformCommand(*outputNode, kAUInitialize,NULL,0)):错误-10851,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58502838/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com