-
-
Notifications
You must be signed in to change notification settings - Fork 20.8k
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
Exposes capture methods to AudioServer + documentation #30468
Conversation
6d2e003
to
322a96e
Compare
…ncy, added documentation.
322a96e
to
47c558b
Compare
Out of curiosity (but maybe useful for documentation): is audio recording a blocking task? If so, if maybe interesting to indicate this in the docs and propose to setup a thread use in this specific case. Also I guess a demo will be interesting to make after this PR is merged. |
I should be able to provide a demo showing this off soon, yes (https://github.com/SaracenOne/godot_speech). I just need to provide a demo and provide a compiled version. As for blocking, everything done regarding recording is done via a thread spun up in the audio driver, and the callbacks are likewise done in this thread too. |
@SaracenOne Alright then, thanks for the precisions. In this case, documentation part is ok for me. |
Thanks! |
This should be reverted, not only having a signal emit in the audio thread is unsafe (Connecting is not thread safe), but some of what happens in there may allocate memory, which is forbidden in the audio thread and should never be done. |
…engine#30468 Reverts the following commits: - c81ec6f: "Exposes capture methods to AudioServer, variable renames for consistency, added documentation." - 47c558b: "Expose audio callbacks as signals." - dabaa11: "Fix to make sure the capture buffers are deallocated at shutdown. Silences warnings." Some documentation improvements were kept for pre-existing methods. See rationale for reverting these changes in godotengine#30468.
Reverted via #35359. |
Revert "Exposes capture methods to AudioServer + documentation" #30468
This PR exposes the AudioDriver capture methods to the AudioServer and scripting system so they can be manually manipulated. I require this for a GDNative plugin I'm working on. It also renames some of the methods and variables for consistency, changes Vector class to a PoolVector so it can be exposed to the scripting API, and adds some missing documentation.