Audiokit: AvAudio error required condition is false: hwFormat - AVAudioIONodeImpl.mm:365

Created on 11 Feb 2017  路  10Comments  路  Source: AudioKit/AudioKit

I have a problem starting audio record, after the use of AudioKit for sound reproduction.

Basically I have an app that performs some analysis using pure AVFoundation. Than some equalization is performed with AudioKit and an output signal is played. It all works perfectly.

Than if I try to come back to analysis stage I get this error when I use AudioOutputUnitStart(..)

[central] 54:   ERROR:    [0x16e283000] >avae> AVAudioIONodeImpl.mm:365: _GetHWFormat: required condition is false: hwFormat
*** Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: hwFormat'

I Think is related to somemething not correctly uninitialized on AudioKit stop I am shure AudioKit.stop()is called when I come back to analysis than I setup again audio session and audio unit.

Any tip regarding this conflict ?

Most helpful comment

Hi Dorian, the problem is an iOS bug which is still open. You can find here a work around I adopted:

http://stackoverflow.com/questions/42470848/coreaudio-crash-avaudioionodeimpl-mm365-gethwformat-required-condition-is

Hope it helps

All 10 comments

What filters are you using? Apple's Band Pass Filter creates this error, so I am wondering if that is part of your equalization.

Thankyou Aure for the answer.

I'm using AKParametricEQ, which make use of AUParametricEQ native filter. I don't think a band pass filter is involved in this kind of processing... Please help me, this problem is really frustrating

Thanks

We ended up dropping Apple's ParametricEQ due to problems discussed here: https://github.com/audiokit/AudioKit/issues/723 Maybe you could try AudioKit's filters instead.

Anyway, I think this is a problem with the lifecycle of the app, is there anyway you can leave the audio engine running in a singleton class?

Thank you for the answer,

Well I will try to handle the lifecycle in a singleton class, hope it solves. Also interesting the Apple's ParametricEQ, I will look for another way.

Thank you for the support

This is happening to us, but ONLY in the device. It runs properly in the simulator. Any ideas how that is possible?

Nadir, were you able to solve it with the singleton?

Hi Dorian, the problem is an iOS bug which is still open. You can find here a work around I adopted:

http://stackoverflow.com/questions/42470848/coreaudio-crash-avaudioionodeimpl-mm365-gethwformat-required-condition-is

Hope it helps

Thanks, checking it out now.

It worked like a charm! All my three different views work without crashing! You dMan! Thanks!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mlostekk picture mlostekk  路  4Comments

JerrySQian picture JerrySQian  路  6Comments

dddx80 picture dddx80  路  3Comments

ghost picture ghost  路  8Comments

impmaarten picture impmaarten  路  5Comments