There was no "process() check" in AudioWorkletProcessor instantiation, and the process() check in registerProcessor() is redundant now, so I wonder whether the intention was to remove the redundant check from registerProcessor()?
This would allow the client AudioWorkletProcessorConstructor to create the process() method in a way other than having it on the prototype, and would provide opportunity for reporting an error through AudioWorkletNode.onprocessorerror.
From about https://github.com/WebAudio/web-audio-api/issues/1767#issuecomment-424687184, there was discussion about moving the check for
process()
out ofregisterProcessor()
.https://github.com/WebAudio/web-audio-api/issues/1767#issuecomment-425165339 then resolved to add an
IsCallable()
check before callingprocess()
in the rendering loop, and to "remove the redundantprocess()
check in the instantiation of AWP".There was no "
process()
check" in AudioWorkletProcessor instantiation, and theprocess()
check inregisterProcessor()
is redundant now, so I wonder whether the intention was to remove the redundant check from registerProcessor()?This would allow the client
AudioWorkletProcessorConstructor
to create theprocess()
method in a way other than having it on the prototype, and would provide opportunity for reporting an error throughAudioWorkletNode.onprocessorerror
.