File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 10
10
// 2. post invocation from audio worklet thread to main thread
11
11
_Atomic uint32_t callbackCount = 0 ;
12
12
13
+ EMSCRIPTEN_WEBAUDIO_T context ;
14
+
13
15
void do_exit () {
14
16
emscripten_out ("do_exit" );
15
17
assert (callbackCount == 16 );
18
+ emscripten_destroy_audio_context (context );
16
19
emscripten_force_exit (0 );
17
20
}
18
21
@@ -198,7 +201,7 @@ uint8_t wasmAudioWorkletStack[4096];
198
201
199
202
int main () {
200
203
// Create an audio context
201
- EMSCRIPTEN_WEBAUDIO_T context = emscripten_create_audio_context (0 /* use default constructor options */ );
204
+ context = emscripten_create_audio_context (0 /* use default constructor options */ );
202
205
203
206
// and kick off Audio Worklet scope initialization, which shares the Wasm
204
207
// Module and Memory to the AudioWorklet scope and initializes its stack.
You can’t perform that action at this time.
0 commit comments