From 7b56788ab808cb8094527172c5aed91d82b23b96 Mon Sep 17 00:00:00 2001 From: Carl Woffenden Date: Wed, 16 Oct 2024 16:19:56 +0200 Subject: [PATCH] Better error message (to see why it fails) --- src/library_webaudio.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/library_webaudio.js b/src/library_webaudio.js index 488c1fbf80da4..54c9404405db5 100644 --- a/src/library_webaudio.js +++ b/src/library_webaudio.js @@ -161,13 +161,13 @@ let LibraryWebAudio = { #if WEBAUDIO_DEBUG console.log(`emscripten_start_wasm_audio_worklet_thread_async() adding audioworklet.js...`); #endif -#if WEBAUDIO_DEBUG - console.log(`emscripten_start_wasm_audio_worklet_thread_async() stack base/sb: ${stackLowestAddress}, size: ${stackSize} (${stackLowestAddress + stackSize})`); -#endif let audioWorkletCreationFailed = () => { #if WEBAUDIO_DEBUG - console.error(`emscripten_start_wasm_audio_worklet_thread_async() addModule() failed!`); + // Note about Cross-Origin here: a lack of Cross-Origin-Opener-Policy and + // Cross-Origin-Embedder-Policy headers to the client request will result + // in the worklet file failing to load. + console.error(`emscripten_start_wasm_audio_worklet_thread_async() addModule() failed! Are the Cross-Origin headers being set?`); #endif {{{ makeDynCall('viip', 'callback') }}}(contextHandle, 0/*EM_FALSE*/, userData); };