Skip to content

Commit e014359

Browse files
authored
When using AudioWorklets, print the error messages also in ASSERTIONS build mode (#24031)
When using AudioWorklets, print the error messages also in ASSERTIONS build mode, since people might not find WEBAUDIO_DEBUG, and WEBAUDIO_DEBUG also prints all sorts of positive confirmation/trace messages. ASSERTIONS is enabled by default in -O0 builds, so does not need to be explicitly enabled for debugging errors. Helps #21178.
1 parent e42d14b commit e014359

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/libwebaudio.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ let LibraryWebAudio = {
163163
#endif
164164

165165
let audioWorkletCreationFailed = () => {
166-
#if WEBAUDIO_DEBUG
166+
#if ASSERTIONS || WEBAUDIO_DEBUG
167167
console.error(`emscripten_start_wasm_audio_worklet_thread_async() addModule() failed!`);
168168
#endif
169169
{{{ makeDynCall('viip', 'callback') }}}(contextHandle, 0/*EM_FALSE*/, userData);
170170
};
171171

172172
// Does browser not support AudioWorklets?
173173
if (!audioWorklet) {
174-
#if WEBAUDIO_DEBUG
174+
#if ASSERTIONS || WEBAUDIO_DEBUG
175175
if (location.protocol == 'http:') {
176176
console.error(`AudioWorklets are not supported. This is possibly due to running the page over unsecure http:// protocol. Try running over https://, or debug via a localhost-based server, which should also allow AudioWorklets to function.`);
177177
} else {

0 commit comments

Comments
 (0)