[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-10-02 13:49:00 +02:00
parent 80b34ccee1
commit a618535628
5 changed files with 314 additions and 185 deletions

View File

@@ -19,6 +19,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])