-
Notifications
You must be signed in to change notification settings - Fork 168
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
Please make high resolution time available within AudioWorkletGlobalScope. #2413
Comments
|
This makes sense. We need to look at the performance object to see if we want everything in it (probably not). |
This comment was marked as off-topic.
This comment was marked as off-topic.
We could do that, but messaging with each other takes extra time. It is the |
This comment was marked as off-topic.
This comment was marked as off-topic.
Right. For my personal use case, I need to know (more) exactly what time the |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Virtual F2F:
|
TPAC 2020:
|
This is what w3c/hr-time#89 is about, it seems possible. |
If repeatably feasible, use of high-resolution time values will likely be valuable for X3D Graphics use of Web Audio API for presentation of acoustics. (This is speculative, potential future use case.) |
Teleconf: It seems the primary use case (not including https://github.com/WebAudio/web-audio-api-v2/issues/77#issuecomment-796910897), is for performance evaluation. Perhaps this is covered in WebAudio/web-audio-api-v2#40, in which case there may not be a need for this in a worklet. Leave this open, but reduce priority, pending more use cases that aren't related to performance measurements. |
AudioWG virtual F2F:
|
Hi everyone, how is the progress going? We need to know the current render capacity, and a high-precision clock is required. |
2023 TPAC Audio WG Discussion: |
I thought the process isolation mechanism addressed high precision timer security issues? In any case, it is possible today to create a high precision timer by creating an AudioWorklet with a SharedArrayBuffer, in an AudioContext with sampling rate of 192000, and in the process function, just ++ an integer in the SAB. That gives you a somewhat precise 0.666msec granular timer, and that can be used to polyfill The need to get |
This comment was marked as off-topic.
This comment was marked as off-topic.
With my Firefox implementer hat on, and after talking internally: In Firefox, iff if the page is able to instantiate |
@padenot What would be the next step to make this possible? It looks like a great addition that is reasonably popular. |
This issue came up again recently on the emscripten side: emscripten-core/emscripten#22962. |
The desired feature
High resolution time available within
AudioWorkletGlobalScope
.I’d love to see
(self.performance.now() + self.performance.timeOrigin)
instead ofDate.now()
in my processor code, as myprocess
function is called every other third milliseconds at the sample rate of 192000 Hz.Note
Currently there’s no way for my processor to use it.
The text was updated successfully, but these errors were encountered: