Open sunggook opened 1 month ago
An AudioWorkletGlobalScope
lifetime is strictly smaller than the AudioContext
's lifetime.
The AudioContext
's currentTime
starts at 0, and is then incremented periodically, on the control thread. The value of the currentTime
is that value.
There is no act of observation, this is a standard, not code. At any point you need this value, you take it from the value it has on the control thread.
Sorry to reopen; this was a confusion in the Chromium implementation.
Is it necessary to mention the control thread at all? That is, could we reword the spec to something like the following instead?
The context time of the block of audio being processed. This must be equal to the value of BaseAudioContext's currentTime attribute.
Describe the issue The spec is not clear about the currentTime of the initial AudioWorketGlobalScope. The spec said about currentTime, "By definition this will be equal to the value of BaseAudioContext's currentTime attribute that was most recently observable in the control thread."
But the questions are what happen if not observed yet, and when does the initial observation happens?
Where Is It https://webaudio.github.io/web-audio-api/#dom-audioworkletglobalscope-currentframe
Additional Information