MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / WebAudioWorkletThreadInitialized

Function WebAudioWorkletThreadInitialized

test/webaudio/audioworklet.c:150–157  ·  view source on GitHub ↗

This callback will fire when the Wasm Module has been shared to the AudioWorklet global scope, and is now ready to begin adding Audio Worklet Processors.

Source from the content-addressed store, hash-verified

148// AudioWorklet global scope, and is now ready to begin adding Audio Worklet
149// Processors.
150void WebAudioWorkletThreadInitialized(EMSCRIPTEN_WEBAUDIO_T audioContext, bool success, void *userData) {
151 assert(success && "Stopped in WebAudioWorkletThreadInitialized");
152
153 WebAudioWorkletProcessorCreateOptions opts = {
154 .name = "noise-generator",
155 };
156 emscripten_create_wasm_audio_worklet_processor_async(audioContext, &opts, AudioWorkletProcessorCreated, 0);
157}
158
159// Define a global stack space for the AudioWorkletGlobalScope. Note that all
160// AudioWorkletProcessors and/or AudioWorkletNodes on the given Audio Context

Callers

nothing calls this directly

Calls 1

assertFunction · 0.50

Tested by

no test coverage detected