Skip to content

WebAudio Worklets not working in Firefox #24955

@Andonvr

Description

@Andonvr

Please include the following in your bug report:

Version of emscripten/emsdk:
Anything from 4.0.8 to 4.0.13

Repo for reproducing is right here <--

This works in Chrome and Safari, but is broken in Firefox.

I followed the guide on Wasm Audio Worklets from here, and adjusted it slightly.
Basically, I added a class to hold a gain value, which I expose using Embind. When creating the Audio Worklet, I pass an instance of it. Later, I change the value of this, and the gain adjusts.

I compile, using CMake, and run using the most simple Vite project.

All of this works perfectly in Chrome.
But in Firefox, when creating the Wasm Audio Worklet (and not anywhere before that), it throws the error RuntimeError: index out of bounds.

With the compiler flag WEBAUDIO_DEBUG, it even prints "Registered new WebAudio object [object AudioWorkletNode] with ID 2" before failing.

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