10

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?

abinop
  • 3,153
  • 5
  • 32
  • 46

1 Answers1

0

Looks like this problem occurs on iOS 12 & 13 on the simulator but works fine when running on device. Source

NSCoder
  • 1,594
  • 5
  • 25
  • 47