WebAudio / web-audio-api

The Web Audio API v1.0, developed by the W3C Audio WG
https://webaudio.github.io/web-audio-api/
Other
1.05k stars 167 forks source link

AudioWorkletNode's processorState after AudioContext got closed #1526

Closed chrisguttandin closed 6 years ago

chrisguttandin commented 6 years ago

After reading the spec, I'm not really sure what the processorState of an AudioWorkletNode should be when the AudioContext which it belongs to gets closed. I created a little example:

// Let's assume this is the body of an async function.
// There is variable called audioContext which is referencing an AudioContext.
// An AudioWorkletProcessor called 'my-processor' was registered and added to that audioContext.

const myNode = new AudioWorkletNode(audioContext, 'my-processor');

await audioContext.close();

const processorState = myNode.processorState;

What will be the value of processorState?

I assume it should be 'stopped' but I'm not sure.

hoch commented 6 years ago

https://github.com/WebAudio/web-audio-api/issues/1451#issuecomment-350042936

processorState is removed from the spec. There is a PR under the review and it is not merged yet.

chrisguttandin commented 6 years ago

Okay, thanks for pointing me to that other issue. I don't know how I could have missed it.

Please, feel free to close the issue.

hoch commented 6 years ago

Closing! :)