-
Notifications
You must be signed in to change notification settings - Fork 69
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
Implement AudioContext suspend() #78
Comments
Further note: AudioContext is supposed to emit a statechanged event when starting, stopping, and deleting the context, and there's supposed to be a status method that reports suspended, running, or closed, when the state has changed. |
One possible implementation; will stop at buffer resolution. avaer@221e1e2 |
The pause feature reduces battery consumption when idle. |
Thank you for bumping this issue. Destructing an AudioContext will release system resources, but does not match the requirements of close. I created a new issue here: #154 For reference, documentation of suspend is here: https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/suspend and the summary is:
|
As of c720c5e suspend and resume now pause and resume processing. Time stops progressing during suspend, and resumes properly. CPU utilization falls during suspend. Please feel free to reopen if there are any issues. |
Spec states that there is a way to temporarily suspend rendering. However, in LabSound you can only start it and never stop, APIwise. Actual implementation of the internal
AudioDestination
has the neededstop()
method, but it is hidden from the exported interfaces. Specifically,AudioDestinationNode
already has only thestartRendering()
and nostopRendering()
. Is there a problem with letting people call it?The text was updated successfully, but these errors were encountered: