AUDIO
Source snapshot · 11 November 2026

Prepared processor routing graphs

Prepared graph replacement

DynamicGraph::new pairs one prepared active graph with a unique GraphControl and two 1..4-slot ownership queues. Control prepares an entire replacement and offers it. Its full ProcessConfig, precision and declared path latency must match the initial contract; inactive/faulted/mismatched graphs and full queues return graph ownership to the caller. No graph is rebuilt on audio.

For each valid outer block, audio selects at most one queued graph in FIFO order. Invalid input silences output before consuming any proposal. Replaced graphs return through retirement storage; take_retired transfers ownership to control for reuse, or bounded reclaim destroys them there. If retirement storage is full, replacement waits and the current graph renders. Dropping control prevents further replacement while keeping the current graph available. Construct/drop both endpoints, reclaim graphs and prepare proposed histories outside callbacks.

Replacement starts the proposed graph's history and does not preserve old node state, drain old tails, crossfade or change the host's latency. Consumers own discontinuity policy, parameter/state transfer and aggregate memory budgets. Each graph's scratch cap is 64 MiB; this is not a cap on all in-flight graphs or node-owned storage. The selected graph retains the explicit fault/reset policy. The engine itself is not a Processor implementation.

The graph crate pins MIT-or-Apache-2.0 rtrb 0.4.0 for safe SPSC ownership transport; see its producer contract. It stays outside the portable umbrella. Tests check accepted FIFO replacement, backpressure, invalid-input preservation, control loss, returned errors, exact configuration and native f64 precision. Destructor probes report no node drops in callbacks; 10,000 graph-reuse/render/reset iterations and 100 synchronized control/audio-thread transfers report zero callback heap operations. Scheduler deadlines and native host/device use remain unvalidated.