Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS audio recording error: input_callback: AudioUnitRender failed, code: -10863 #58180

Open
Tracked by #76797
wenbingzhang opened this issue Feb 16, 2022 · 7 comments · May be fixed by #88628
Open
Tracked by #76797

macOS audio recording error: input_callback: AudioUnitRender failed, code: -10863 #58180

wenbingzhang opened this issue Feb 16, 2022 · 7 comments · May be fixed by #88628

Comments

@wenbingzhang
Copy link

Godot version

v3.4.2

System information

macos 11.6 GLES2

Issue description

input_callback: AudioUnitRender failed, code: -10863
drivers/coreaudio/audio_driver_coreaudio.cpp:237 @ input_callback()

Similar problems and solutions:baresip/baresip#601
I hope a great god can solve this problem.

Steps to reproduce

/Applications/Utilities/Audio\ MIDI\ Setup.app SampleRate 48000
godot MixRate 44100

It can be reproduced by using plug-in.

Minimal reproduction project

https://github.com/c-as/godot-voip

@akien-mga akien-mga changed the title record: AudioUnitRender error (-10863) macOS audio recording error: input_callback: AudioUnitRender failed, code: -10863 Feb 16, 2022
@Calinou Calinou added this to the 4.0 milestone Feb 16, 2022
@akien-mga
Copy link
Member

Is this still reproducible in 4.0 RC 3 or later?

@akien-mga akien-mga modified the milestones: 4.0, 4.x Feb 22, 2023
@wenbingzhang
Copy link
Author

Is this still reproducible in 4.0 RC 3 or later?

I just tested it and it can be reproduced.

@doing-fine-thanks
Copy link

Hey, just ran into this issue in 4.2dev6.

@sean-kintone
Copy link

sean-kintone commented Feb 21, 2024

Official Mic Record Demo project on MacOS also has this error, and fails to record microphone sound as well:

Error:

E 0:00:00:0685   input_callback: AudioUnitRender failed, code: -10863
  <C++ Source>   drivers/coreaudio/audio_driver_coreaudio.cpp:238 @ input_callback()

Demo App:
https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record

Mac m1 Sonoma 14.2.1
Godot 4.2.1 Stable

Steps:

Open Project, Click Record.

@bruvzg
Copy link
Member

bruvzg commented Feb 21, 2024

The root of the problem seems to be "mix rate" in the project settings, if it's not matching mic mix rate it won't work.

@bruvzg
Copy link
Member

bruvzg commented Feb 21, 2024

It's also won't work if sampling rate for output is too different.

e.g., external mic with 16KHz rate and output with 44.1KHz, setting rate for both to 16KHz will not work in this case. But everything in the engine except mix rate to be the same for all streams, so I have no idea to fix it.

@sean-kintone
Copy link

sean-kintone commented Mar 25, 2024

I have confirmed that manually setting my microphone to match the hz in the sample project via macos's settings allows audio to be recorded.
This works for both internal and external microphone.
Maybe I will try to test that PR linked, because having an entire class of input (audio input) not working on linux or macos fixed might help a lot of people

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants