AudioGraphSettings interface

Signature:

export interface AudioGraphSettings<Pins extends string = "audio"> extends ProcessorNodeSettings<AudioGraphNode<Pins>>

Properties

Property Type Description

build

(graph: AudioGraphBuilder) ⇒ AudioNode | Record<string, AudioGraphOutputSpec>

Build the processing graph and declare its output(s). Return a single node for one output (which inherits the source’s stream key), or a record of renditionName → output for multiple independently-subscribable outputs — each emits a stream whose key carries that renditionName, so downstream subscribes to a specific one by rendition. Outputs may have different channel layouts, and each may pin analysis-tap readings into its qualityMetrics (the { node, measurements } form).

onMeasurement?

(measurement: AudioGraphMeasurement) ⇒ void

(Optional) Called for every measurement an analysis tap (e.g. rms) emits.

onParamsApplied?

(update: { nodeIndex: number; params: Record<string, number>; transitionMs?: number; }) ⇒ void

(Optional) Called with every runtime parameter update as the server applies it (the param echo) — relay these to your own UI clients to keep a multi-operator surface in sync without tracking state yourself. nodeIndex matches the wire indices getGraph() reports.

sources?

Pins[]

(Optional) Multi-source mode: named input pins, one per graph source, in wire-source order — inputs[k] in the builder is the stream subscribed to pin sources[k] (via with audioToPin()). Omit for a single-input graph (plain subscribe). Sources are co-timed by sample count from each one’s first frame — start them together (no PTS-based sync yet).