When I try to run my app on a real device I get the following error:
"...AVAEInternal.h:109 [AVAudioEngineGraph.mm:2054:InstallTapOnNode: (err = AUGraphParser::InitializeActiveNodesInInputChain(ThisGraph, *inputNode)): error -10868
...*** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'error -10868' terminating with uncaught exception of type NSException] "
The error happens when I try to start my Audio engine, the only code that gets executed before that is:
override func viewDidLoad() {
super.viewDidLoad()
addNavBarImage()
print("init started ")
guard let input = engine.input else { fatalError() }
guard let device = engine.inputDevice else { fatalError() }
initialDevice = device
mic = input
tappableNodeA = Fader(mic)
print("input selected")
mixer = Mixer(arpeggioSynthesizer, padSynthesizer, bassSynthesizer, drumKit)
filter = MoogLadder(mixer)
filter?.cutoffFrequency = 20_000
engine.output = filter
print("objects init")
tracker = PitchTap(mic) { pitch, amp in
DispatchQueue.main.async {
self.update(pitch[0], amp[0])
}
}
print("objects init finished")
start() <- this is the point where the code errors out, its just the try function to start the engine.
}
What could be causing this?