Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"a.html.gz": 357,
"a.js": 4077,
"a.js.gz": 2137,
"a.wasm": 1298,
"a.wasm.gz": 868,
"total": 5894,
"total_gz": 3362
"a.wasm": 1308,
"a.wasm.gz": 876,
"total": 5904,
"total_gz": 3370
}
5 changes: 4 additions & 1 deletion test/webaudio/audioworklet.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
begin to fire.
*/

EMSCRIPTEN_WEBAUDIO_T context;

// TEST_AND_EXIT is defined when running in the Emscripten test harness. You can
// strip these out in your own project (otherwise playback will end quickly).
#ifdef TEST_AND_EXIT
Expand Down Expand Up @@ -70,6 +72,7 @@ bool main_thread_tls_access(double time, void *userData) {
testTlsVariable = (int)time;
// Exit to the test harness after enough calls to ProcessAudio()
if (lastTlsVariableValueInAudioThread >= 100) {
emscripten_destroy_audio_context(context);
emscripten_force_exit(0);
}
return true;
Expand Down Expand Up @@ -128,7 +131,7 @@ int main() {
assert(!emscripten_current_thread_is_audio_worklet());

// 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