@@ -168,18 +168,22 @@ class BootstrapMessages extends AudioWorkletProcessor {
168168 }
169169#endif
170170 // Register a real AudioWorkletProcessor that will actually do audio processing.
171- registerProcessor ( d [ '_wpn' ] , createWasmAudioWorkletProcessor ( d [ 'audioParams' ] ) ) ;
171+ // 'ap' being the audio params
172+ registerProcessor ( d [ '_wpn' ] , createWasmAudioWorkletProcessor ( d [ 'ap' ] ) ) ;
172173#if WEBAUDIO_DEBUG
173- console . log ( `Registered a new WasmAudioWorkletProcessor "${ d [ '_wpn' ] } " with AudioParams: ${ d [ 'audioParams ' ] } ` ) ;
174+ console . log ( `Registered a new WasmAudioWorkletProcessor "${ d [ '_wpn' ] } " with AudioParams: ${ d [ 'ap ' ] } ` ) ;
174175#endif
175176 // Post a Wasm Call message back telling that we have now registered the
176- // AudioWorkletProcessor class, and should trigger the user onSuccess
177- // callback of the
178- // emscripten_create_wasm_audio_worklet_processor_async() call.
179- p . postMessage ( { '_wsc' : d [ 'callback' ] , 'x' : [ d [ 'contextHandle' ] , 1 /*EM_TRUE*/ , d [ 'userData' ] ] } ) ; // "WaSm Call"
180- } else if ( d [ '_wsc' ] ) {
177+ // AudioWorkletProcessor, and should trigger the user onSuccess callback
178+ // of the emscripten_create_wasm_audio_worklet_processor_async() call.
179+ //
181180 // '_wsc' is short for 'wasm call', using an identifier that will never
182181 // conflict with user messages
182+ // 'cb' the callback function
183+ // 'ch' the context handle
184+ // 'ud' the passed user data
185+ p . postMessage ( { '_wsc' : d [ 'cb' ] , 'x' : [ d [ 'ch' ] , 1 /*EM_TRUE*/ , d [ 'ud' ] ] } ) ;
186+ } else if ( d [ '_wsc' ] ) {
183187 Module [ 'wasmTable' ] . get ( d [ '_wsc' ] ) ( ...d [ 'x' ] ) ;
184188 } ;
185189 }
0 commit comments