Godot microphone audio input not working on MacOS
Recently, I created a game with Godot where I needed to utilise microphone input via the AudioStreamPlayer node. On windows it worked fine, but on MacOS, hundreds of errors spawned in the debugger on running the game.
This is a known bug with Godot, you can check out the GitHub Issue if you want to help to solve it.
It is caused by Godot not detecting the Macbook microphone, because its sampling frequency is set to 48kHz by default. All you need to do is to change the frequency to 40.1kHz.
This setting can be found in the app Audio MIDI Setup. Just search for it with your spotlight.
And there you go! Your Godot microphone input should work fine now :)
I am not the author of this solution. I just found the error hard to Google, hopefully this will help.
Tested with Godot 3.5 on a M2 Macbook Air.