Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
CoreAudio crash - AVAudioIONodeImpl.mm:365: _GetHWFormat: required condition is false: hwFormat
I don't know if this will work, but it did for me. I am also not 100% sure why it worked, but I think by changing the audio session mode from .measurement to .voicePrompt, it only requires voice input and not output. Therefore, with no output, the error of input format not matching output format cannot occur, because there is no output. Please find my bug fix below:Old code with format matching error:do { AudioOutputUnitStop((audioEngine.inputNode.audioUnit)!) AudioUnitUninitialize((audioEngine.inputNode.audioUnit)!) try audioSession.setCategory(.playAndRecord, mode: .measurement, options: .duckOthers) } catch let error { print("\(error)") }New code without error:do { AudioOutputUnitStop((audioEngine.inputNode.audioUnit)!) AudioUnitUninitialize((audioEngine.inputNode.audioUnit)!) try audioSession.setCategory(.playAndRecord, mode: .voicePrompt, options: .duckOthers) } catch let error { print("\(error)") }I may be wrong as I am a novice still. But I hope this helps!