I'm integrating Audiobus into my AudioKit-based app, and have followed the instructions here, but when I call
Audiobus.start(), the app will continue running for about a second, then I get some error output, followed by a crash:
2017-03-22 23:25:45.620918 Vulse[20369:7115604] [central] 54: ERROR: [0x16e167000] >avae> AVAudioIONodeImpl.mm:365: _GetHWFormat: required condition is false: hwFormat
2017-03-22 23:26:03.917219 Vulse[20369:7115604] *** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: hwFormat'
So, I got the FilterEffects example up and running to see if the issue was just in my app. (First I had to change the
input variable in viewDidLoad to a property, because it was deiniting too early and causing a crash.) But after fixing that, I unfortunately got the same error above.
Interestingly, for the second or two before the app crashes, everything seems to work properly: the app takes audio input from audiobus and I can hear it output with the reverb applied. Also (at least in my app) if I remove the
Audiobus.start(), but still try to instantiate an AKStereoInput, I get a similar message:
SetOutputFormat: required condition is false: format.sampleRate == hwFormat.sampleRate
Do you get the same crash when trying this yourself, with the latest AudioKit release? I'm using Audiobus 2.3.3, on an iPhone 6s running iOS 10.2.1.