1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

[HTML5] Refactor audio drivers. Implement AudioWorklet w/o threads.

Performances are not great in general, bad on Firefox, on Chrome, well,
it could be an improvement. Leave it as a fallback for now, but can be
forced via project settings if desired (or custom JavaScript logic via
the "args" option).

I'm actually surprised this works, it involves so many allocations, but
there's no way around it when SharedArrayBuffer is not available :(.
This commit is contained in:
Fabio Alessandrelli
2021-09-12 19:23:30 +02:00
parent e902347a8c
commit 246334b836
7 changed files with 339 additions and 154 deletions

View File

@@ -40,7 +40,7 @@
class OS_JavaScript : public OS_Unix {
MainLoop *main_loop = nullptr;
AudioDriverJavaScript *audio_driver_javascript = nullptr;
List<AudioDriverJavaScript *> audio_drivers;
bool idb_is_syncing = false;
bool idb_available = false;