Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fix "Failed to fill complex buffer in float converter" in EzAudio swift iOS 13

I am using EZaudio to play mp3 files and it works on iOS 12 and below but on physical Device (iPhone X) running iOS 13 app crashed and console print error

Error : Failed to fill complex buffer in float converter

I am using Audiokit and PandoraPlayer framework what may cause this error and how to fix this ?

I'm using this code to configure avaudiosession and it works fine on iOS 12 and below

private func configureAudio() {
        do {

            try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default)
            try AVAudioSession.sharedInstance().setActive(true)


            updateCommandCenter()

        } catch {
            print(error)
        }
        AKSettings.playbackWhileMuted = true;
        AKSettings.enableRouteChangeHandling = true
    }

I think EZAudioFloatConverter and microphone may cause this problem but I am not using microphone in my app

like image 505
mahad shahib Avatar asked Oct 16 '25 14:10

mahad shahib


1 Answers

This worked for me: In AudioKit I changed in file EZOutput.m constant : Float64 const EZOutputDefaultSampleRate = 48000.0f. By default this constant is 44100.0f

like image 62
ilya Blinov Avatar answered Oct 18 '25 04:10

ilya Blinov