Failed to record audio on iOS

Godot Version

4.5.1

Question

I exported the audio mic record demo( godot-demo-projects/audio/mic_record at master · godotengine/godot-demo-projects · GitHub ) to my iphone with iOS 18.6.2. And error message was printed in Xcode as the app was openned:

AURemoteIO.cpp:1666  AUIOClient_StartIO failed (561145187)

drivers/coreaudio/audio_driver_coreaudio.mm:522:input_start(): AudioOutputUnitStart failed, code: 561145187 AudioOutputUnitStart failed, code: 561145187

No sound was recorded. When I tried to save the audio file, it only saved a file without any sound, but it had correct duration.

When you exported it, did you enable the Microphone access flag? Without it iOS automatically blocks all attempts without even asking the user.

Thanks for your reply. I have enabled “Audio > Driver > Enable Input“ flag, and I can’t see any settings about “Microphone access flag” in iOS exporting options. When I opened the app at the first time, it asked me for the microphone permission and I accepted it, but it still printed the errors and I couldn’t record any sound.

That would beAVAudioSession.ErrorCode.cannotStartRecordingwhich is described as “This error type usually occurs when an app starts a mixable recording from the background and it isn’t configured as an Inter-App Audio app.”

Which implies it has permission but is getting tripped up somehow.