I am running XCode 12.4 and iOS 13.7. The following, straightforward class
import AudioKit
import UIKit
class SoundManager {
private var sampler: AKAppleSampler
private var booster: AKBooster
private var reverb: AKReverb
private let mixer: AKMixer
required init() {
sampler = AKAppleSampler()
booster = AKBooster(sampler, gain: 3.0)
reverb = AKReverb(booster)
mixer = AKMixer()
}
func setup() {
reverb.loadFactoryPreset(.largeRoom)
mixer.connect(input: reverb)
AKManager.output = mixer
try? AKManager.start()
}
}
when called
let soundManager = SoundManager()
soundManager.setup()
crashes with
HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range AQME.h:254:IOProcFailure: AQDefaultDevice (1): output stream 0: null buffer AQMEIO_HAL.cpp:1774:IOProc: EXCEPTION thrown (-50): error != 0
This is something that is crashing on iOS 13.7 simulator but in some 14.x versions doesn't produce a problem. Any idea?