godot
godot copied to clipboard
[macOS/iOS] Use hardware sampling rates for audio I/O.
Instead of "mix_rate" from the project settings, use preferred OS values, since API can work only with the limited set of values depending on device.
Fixes https://github.com/godotengine/godot/issues/58180
TODO:
- I'm not sure if changes in the
AudioStreamPlaybackMicrophone
are sufficient to correctly resample it. - We should track device changes and adjust sampling rates accordingly, but I'm not sure if Godot audio subsystem is capable of handling sampling rate changes.
Edit: I corrected a typo in "mix_rate". - @adamscott