[HTML5] Run Audio process in thread when available

This should fix some of the audio stuttering issues when the HTML5
export is compiled with threads support.
The API should be ported to AudioWorklet to (hopefully) be perfect.
That though, cannot be backported to 3.2 due to extra restriction of
AudioWorklet (which only runs in SecureContext, and needs a polyfill for
Safari).
This commit is contained in:
Fabio Alessandrelli 2020-09-28 15:43:48 +02:00
parent a57bd798cd
commit 61d4b8045c
5 changed files with 331 additions and 186 deletions

View file

@ -18,6 +18,7 @@ build = env.add_program(build_targets, javascript_files)
js_libraries = [
"native/http_request.js",
"native/library_godot_audio.js",
]
for lib in js_libraries:
env.Append(LINKFLAGS=["--js-library", env.File(lib).path])