-
Notifications
You must be signed in to change notification settings - Fork 17
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 BaseAudioContext.state
#101
Comments
Once this is implemented, we can fix the panic that occurs when you add nodes to a closed context, e.g.
The panic occurs because we attempt to use the closed message channel to the render thread. As per discussion in WebAudio/web-audio-api#1580, creating nodes on a closed context should not throw an exception (but will also not do anything useful) |
Another panic that can be fixed is let context = AudioContext::new(None);
let analyser = context.create_analyser();
context.close();
analyser.get_float_time_domain_data(vec![1.; 128]); This should just return zeroes when the context is paused/closed |
This can be fixed properly after implementing #101
https://www.w3.org/TR/webaudio/#dom-baseaudiocontext-control-thread-state-slot
Before we think about also adding onStateChange handlers ( https://www.w3.org/TR/webaudio/#dom-baseaudiocontext-onstatechange ) we need to think about the architecture for event handling (probably in a separate issue)
The text was updated successfully, but these errors were encountered: