You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec defines and refers to an Active Source Flag in a worklet processor. But the spec basically only says what the initial value is and that it's set by the return value of the process() method. (And also reflects the processor state, which we are probably going to remove completely.)
This isn't my memory of the long and detailed discussion we had on this. My memory was that the active source flag was set to the return value of process(), but once the flag became false, it could never be changed to true. And when it became false, process() would not get called anymore and the worklet node would essentially become a sink, pulling on it's inputs for processing, but always producing silence.
In this way, the worklet could continue to process if references to the worklet node itself were dropped. When the flag became false, this signaled to the system that the processor (and node) could be GCed.
I can't find any such description of this in the spec.
I don't think you're correct about this. The spec does say more than that, and it's pretty clear that process() can be called after returning false as long as there are connected inputs:
The process() method is called synchronously by the audio rendering thread at every render quantum, if ANY of the following active processing conditions are true:
The associated AudioWorkletProcessor's active source flag is equal to true.
There are one or more connected inputs to the AudioWorkletNode.
So, as long as there are connected inputs, process() continues to get called.
Activity
joeberkovitz commentedon Dec 14, 2017
I don't think you're correct about this. The spec does say more than that, and it's pretty clear that
process()can be called after returning false as long as there are connected inputs:So, as long as there are connected inputs,
process()continues to get called.rtoy commentedon Jan 18, 2018
Reconsider after discussing #1471.
rtoy commentedon Feb 22, 2018
#1471 isn't relevant to this issue any more.
rtoy commentedon Mar 8, 2018
Close this because #1471 should take care this and we're not changing the meaning of the flag.