-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Interactive audio worklet futex test fails #22962
Comments
There's more to this. If I comment out
Because when the audio worklet code hits here:
As the comment says, an audio worklet will take the same path as the main thread:
Which then fails when it arrives here:
(And in testing, it's correct that |
And adding more: since
But are fine without assertions. So the questions comes to this:
Is still true and Audio Worklets will need this fixing or another implementation? Bit of a rabbit hole... |
It turns out @tklajnscek (writer of the other implementation mentioned in the issue and with whom I work) exposed a separate futex to the worklet. I'll create an additional PR later. |
Having discussed this over here, the consensus being the existing working API spinlocks should be used, so
But this could be changed to use Line 1378 in 119a427
And since these ms calls don't need to resolution the ns calls do, is probably a good compromise and will only affect the Audio Worklet for little overhead (either |
For what it's worth, I don't see any other way except if we only allow infinite timeout... |
Is this because |
Exactly that, The low precision of the |
The relevant WebAudio issue here: WebAudio/web-audio-api#2413 With comments from @juj :) |
Fix incoming in #22995 (work in progress for now) |
Fix #22995 ready. |
With the latest Emscripten:
This interactive audio worklet futex test fails:
emscripten/test/test_interactive.py
Line 298 in 299be0b
Running:
It fails to compile due to
_emscripten_thread_supports_atomics_wait()
being internal to the pthread implementation:Further, the comment here:
emscripten/system/lib/pthread/emscripten_thread_state.S
Line 56 in 299be0b
Is incorrect since
!ENVIRONMENT_IS_WEB
is true for Audio Worklets butAtomics.wait
is not supported.The text was updated successfully, but these errors were encountered: