AUDIO
Source snapshot · 11 November 2026

Standalone audio devices

Processing thread

PreparedOutput is also independently usable for offline adapter tests. It prepares 1..=64 output channels, no inputs, no events/auxiliary buses and 1..=65,536 scratch frames per channel. Larger callbacks are split into bounded blocks and their planar outputs interleaved into the device buffer. This policy requires processors whose output remains correct across block partitions. Transport carries a monotonic logical sample position starting at zero; it is not a device clock or host playback/latency estimate.

A partial interleaved frame rejects and silences the entire callback without advancing DSP. A processor fault silences its sub-block; later sub-blocks continue and time advances. Silence status is enforced. Scratch is cleared before each sub-block, so omitted output writes cannot expose stale audio. The framework's normal rendering path allocates/deallocates nothing and takes no locks or I/O. Processor implementations retain their own callback obligations.

The live callback contains unwinding panics, silences output and permanently disables DSP for that stream. Reopen to recover. Panic handlers/unwinding are exceptional and have no real-time guarantee; panic=abort cannot be contained. The framework's own callback code has no panic path: a violated internal invariant (scratch length, owned processor or queue) silences that sub-block and counts a processor fault, or reads as input underflow, without disabling DSP. The plain input callback, which has no unwind containment, likewise only counts an invalid buffer (decision 0295). Diagnostics use relaxed atomic counts, not coherent meters, logs or latency measurements. Native backend operations are outside the Rust allocation counter.