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

Revert "Exposes capture methods to AudioServer + documentation" #30468 #35359

Merged

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Jan 20, 2020

Reverts the following commits (from #30468 and #32760):

  • 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 #30468.

…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.
@akien-mga akien-mga added this to the 3.2 milestone Jan 20, 2020
@akien-mga akien-mga requested a review from a team as a code owner January 20, 2020 12:22
@akien-mga akien-mga merged commit cfeba2c into godotengine:master Jan 20, 2020
@akien-mga akien-mga deleted the revert-30648-unsafe-audioserver branch January 20, 2020 12:40
@reduz
Copy link
Member

reduz commented Jan 20, 2020

Some info about audio server

  • Audio threads must never do anything that risks a kernel preemption, which includes system calls.
  • Memory allocation causes system calls, and signal emission in some cases may do it
  • Emitting signals from anything other than the main thread is unsafe, because connecting/disconnecting/emitting is not.
  • There are better ways to hook to capture or play audio, just create your own audio effect and put it in a bus.

akien-mga added a commit that referenced this pull request Jan 20, 2020
@akien-mga
Copy link
Member Author

I had missed commit 69f7263 in this PR, now also reverted via b711c09.

@madmiraal madmiraal mentioned this pull request Feb 5, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants