OptionalautoOptionalcreateOptionalloggerOptional logger for Cacophony's host-side diagnostic output (the
[cacophony/worklet] messages emitted while loading AudioWorklet
modules, plus the "AudioWorklet not supported" warning).
When provided, all such output is routed through this object instead of
the global console. Useful for capturing or redirecting logs in Node /
headless / CLI hosts. Takes precedence over RuntimeOptions.quiet.
OptionalquietIf true, suppresses all of Cacophony's host-side diagnostic output by
installing a no-op logger. Equivalent to passing logger: noopLogger.
Ignored when an explicit RuntimeOptions.logger is also provided.
OptionalresolveOptional hook to remap a worklet module URL just before it is handed to
audioWorklet.addModule. Receives the worklet's WorkletModule.name
and its default WorkletModule.url; return the URL to load (return
url unchanged to keep the default).
The library build inlines every worklet bundle as a base64 data: URL,
which the browser loads directly but node-web-audio-api cannot resolve.
The cacophony/node adapter installs a resolver here that points
addModule at the bundle file on disk instead, so worklet-backed effects
work headless. Has no effect in the browser, where the default is used.
If
true(the default), Cacophony installs one-timetouchend/click/keydownlisteners ondocument.bodywhenever the audio context is constructed insuspendedstate. The first user gesture resumes the context, plays a silent primer buffer (required by iOS Safari for the context to truly unlock), removes the listeners, and emits theunlockevent on the Cacophony instance.Set to
falseto opt out — you are then responsible for callingcacophony.resume()yourself in response to a user gesture.Has no effect when the context is already running, on offline contexts, or in non-browser environments (
document === undefined).