OptionalautoOptionalautoIf true (the default), Cacophony installs one-time touchend / click /
keydown listeners on document.body whenever the audio context is
constructed in suspended state. 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 the unlock
event on the Cacophony instance.
Set to false to opt out — you are then responsible for calling
cacophony.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).
OptionalcreateOptionalloggerOptional logger for host-side worklet and browser session diagnostics, including recovery and device-enumeration failures.
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 resolved default 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.
OptionalspatialDefault exponential time constant in seconds for source and listener motion. 0 (default) preserves immediate writes. Sources/voices can override spatialSmoothingTau; listenerSmoothingTau controls listener updates independently. Must be finite and nonnegative.
Observe browser context and device-list changes and attempt silent recovery while the page is visible. Foreground signals retry blocked recovery; gestures remain governed by autoUnlock. Explicit pause() is never recovered. Set false to disable these listeners. No effect offline or outside browsers.