Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/webaudio/audioworklet_post_function.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
// 2. post invocation from audio worklet thread to main thread
_Atomic uint32_t callbackCount = 0;

EMSCRIPTEN_WEBAUDIO_T context;

void do_exit() {
emscripten_out("do_exit");
assert(callbackCount == 16);
emscripten_destroy_audio_context(context);
emscripten_force_exit(0);
}

Expand Down Expand Up @@ -198,7 +201,7 @@ uint8_t wasmAudioWorkletStack[4096];

int main() {
// Create an audio context
EMSCRIPTEN_WEBAUDIO_T context = emscripten_create_audio_context(0 /* use default constructor options */);
context = emscripten_create_audio_context(0 /* use default constructor options */);

// and kick off Audio Worklet scope initialization, which shares the Wasm
// Module and Memory to the AudioWorklet scope and initializes its stack.
Expand Down