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

MicRecord Demo AudioUnitRender failed on MacOS #900

Closed
turnercore opened this issue Mar 29, 2023 · 3 comments
Closed

MicRecord Demo AudioUnitRender failed on MacOS #900

turnercore opened this issue Mar 29, 2023 · 3 comments

Comments

@turnercore
Copy link

Which demo project is affected:
godot-demo-projects/godot-audio-demo/audio/mic_record

OS/device including version:
Apple M1 Pro 16GB
Ventura 13.2.1

Issue description:
When loading the demo project get multiple errors a second, recording doesn't work.
Errors are all this:
E 0:00:03:0139 input_callback: AudioUnitRender failed, code: -10863
<C++ Source> drivers/coreaudio/audio_driver_coreaudio.cpp:238 @ input_callback()

It has to do something with the AudioStreamMicrophone because if I remove that from the AudioStreamRecord node then the errors stop. Also if I turn the AudioStreamRecord node to not playing the errors stop. Tried manually creating a new mic resource and attaching that, got errors just the same. Also, the audio doesn't record and playback in addition to the errors.

Screenshots of issue:

Screenshot of Godot

@turnercore turnercore added the bug label Mar 29, 2023
@Calinou
Copy link
Member

Calinou commented Mar 29, 2023

Recording should work if you change Mix rate to 48000 Hz in the demo, or configure macOS to use 44100 Hz sample rate.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
@turnercore
Copy link
Author

Thanks! That worked, but just for anyone that finds that after you need to change the Mix rate to 48000Hz in the Project Settings, not the script. (Although I also changed the default in the script as well).

@Calinou
Copy link
Member

Calinou commented Mar 29, 2023

Thanks! That worked, but just for anyone that finds that after you need to change the Mix rate to 48000Hz in the Project Settings, not the script. (Although I also changed the default in the script as well).

Does recording work if you change mix rate to 48000 Hz in the Project Settings, but keep the Mix rate option in the demo to its default 44100 Hz?

I'm working on a PR to override the mix rate on macOS, so that audio recording should work out of the box. I wonder if I actually have to change the saved mix rate, or just the project setting.

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

No branches or pull requests

2 participants