Skip to content

Commit ff6c945

Browse files
committed
Correctly halt for btest_exit()
1 parent 108cea0 commit ff6c945

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/webaudio/audioworklet.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ bool main_thread_tls_access(double time, void *userData) {
8181
// This callback will fire after the Audio Worklet Processor has finished being
8282
// added to the Worklet global scope.
8383
void AudioWorkletProcessorCreated(EMSCRIPTEN_WEBAUDIO_T audioContext, bool success, void *userData) {
84-
if (!success) return;
84+
if (!success) {
85+
emscripten_out("Stopped in AudioWorkletProcessorCreated");
86+
assert(0);
87+
return;
88+
}
8589

8690
// Specify the input and output node configurations for the Wasm Audio
8791
// Worklet. A simple setup with single mono output channel here, and no
@@ -111,7 +115,11 @@ void AudioWorkletProcessorCreated(EMSCRIPTEN_WEBAUDIO_T audioContext, bool succe
111115
// AudioWorklet global scope, and is now ready to begin adding Audio Worklet
112116
// Processors.
113117
void WebAudioWorkletThreadInitialized(EMSCRIPTEN_WEBAUDIO_T audioContext, bool success, void *userData) {
114-
if (!success) return;
118+
if (!success) {
119+
emscripten_out("Stopped in WebAudioWorkletThreadInitialized");
120+
assert(0);
121+
return;
122+
}
115123

116124
WebAudioWorkletProcessorCreateOptions opts = {
117125
.name = "noise-generator",

0 commit comments

Comments
 (0)