Skip to content

AudioWorklet improvements #127

@b-ma

Description

@b-ma

Remaining todos and ideas following #124

  • Review rules and fix number of channels outputs when input change
  • Use a pool of Float32Array channels to avoid allocation and GC (as much as possible)
  • Ensure we run run_audio_worklet_global_scope and setImmediate only once per render quantum
  • Use the fact that parameterDescriptors are ordered to avoid transferring parameter keys, i.e. NapiAudioWorlketProcessor::param_values could just be Vec<&'static [f32]>
  • Review how message passing is done between audio and worklet threads (possibly use parking_lot crate ?)
  • Dry run process functions to force the JIT compiler to optimize them ? (might break some wpt checks) could create issues If the worklet buffer some values
  • Review and annotate unsafe sections
  • Change the thread_priority crate to https://github.com/mozilla/audio_thread_priority
  • Use a CondVar instead of crossbeam channel for Worker/Rust message passing
  • Propagate back error to rust thread in case of WorkletAbruptCompletionResult to remove the Worklet from graph
  • ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions