AKManager Audiokit crash: HALB_IOBufferManager_Client::GetIOBuffer: the stream index is out of range
Asked Answered
C

1

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?

Clipfed answered 6/2, 2021 at 12:51 Comment(4)
Have the same using AVPlayer on an iOS13.7 simulator. No problems on iOS14 simulators.Algebra
have you find the solution?Lapland
Have you get the solution. I'm using Xcode 12.5.1 and simulator XR version 12.4.Yl
Have the same problem, I am using Xcode 13.2.1 and iOS 13Mazarin
S
0

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

Spelter answered 13/10, 2022 at 4:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.