Skip to content

Building wasm to run in AudioWorklet environment which is controlled by JS #20581

@stefanholmer

Description

@stefanholmer

I have a use-case where I want to run a wasm module from within an audio worklet in a similar way to what's described here:
https://developer.chrome.com/blog/audio-worklet-design-pattern/#setting-up

this relies on the environment being detected as SHELL, which is a bit odd. See also #6230 (comment).

Now there's an AUDIO_WORKLET environment available, but this seems to be heavily tied to the Wasm Audio Worklets API and in turn Wasm Workers, and doesn't allow for the pattern described above. A problem with Wasm Audio Worklets is that they rely on shared memory, which may not always be available.
https://emscripten.org/docs/api_reference/wasm_audio_worklets.html#wasm-audio-worklets-api

It would be nice if it was possible to build for and specify the audio worklet environment without having to use Wasm Audio Worklets API, and not have to specify the SHELL environment which, I guess, may not be guaranteed to work indefinitely?

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