Skip to content
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

[3.2][HTML5] Port inline JS code to libraries, AudioWorklet support. #43454

Merged
merged 5 commits into from
Nov 11, 2020

Commits on Nov 6, 2020

  1. [HTML5] Fix audio buffer size and latency hint.

    The size of the audio buffer was incorrectly doubled when creating the
    script processor.
    latencyHint is expressed in seconds, not milliseconds.
    Additionally, on some browsers it actually affect the performance and
    stability of the audio driver.
    For this reason it has been completely disabled (interactive) and a not
    has been left for future reference.
    Faless committed Nov 6, 2020
    Configuration menu
    Copy the full SHA
    f39b46f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10e69f5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a7ecb3c View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2020

  1. [HTML5] Port JavaScript inline code to libraries.

    The API is implemented in javascript, and generates C functions that can
    be called from godot.
    This allows much cleaner code replacing all `EM_ASM` calls in our C++
    code with plain C function calls.
    This also gets rid of few hacks and comes with few optimizations (e.g.
    custom cursor shapes should be much faster now).
    Faless committed Nov 10, 2020
    Configuration menu
    Copy the full SHA
    e52ed6d View commit details
    Browse the repository at this point in the history
  2. [HTML5] AudioWorkletAPI implementation.

    Rewrote AudioDriverJavaScript to support multiple processor nodes.
    The old (and deprecated) ScriptProcessorNode when threads are not
    available, and the new AudioWorklet API when threads are enabled.
    
    The new implementation uses two ring buffers and a shared state to
    communicated with the AudioWorklet thread.
    
    The audio.worklet.js JavaScript file is always added to the export
    template, but only really used (and download) in the thread build.
    Faless committed Nov 10, 2020
    Configuration menu
    Copy the full SHA
    6d939b7 View commit details
    Browse the repository at this point in the history