AU render/state contract¶
AU parameter values are physical schema values: Gain is 0..4 with unity at 1.
Saved state is the complete shared native state, including bypass. Its canonical
record remains authoritative over cached superclass AU parameter values; malformed
recall preserves the previous publication. Control edits and newer complete
restores may coalesce. One-attempt Busy/Stale publication outcomes are bounded;
callers using NativeSession can check control return values. The AU main-queue
timer refreshes cached parameter values/observers at 30 Hz. Headless hosts without
a serviced main queue call refreshParameterValues on control when reading cached
values after direct internal rendering.
Allocation validates noninterleaved f32 bus/rate/frame bounds before preparation.
Maximum frames are 65536, default 4096. Parameter/MIDI lists validate completely
before input pull or DSP; at most 1024 links and 1024 - parameter_count
flattened events are accepted, reserving slots for active parameter ramps.
Past/immediate events clamp to frame zero; future/out-of-order events reject.
Ramps retain remaining duration across blocks and cancel on newer complete
state recall or reset. If repeated concurrent control publication prevents
observing the accepted restore's values, a newly started ramp uses its last
observed base value; the DSP restore itself remains coherent. Native DSP smoothing
remains the processor's own behavior.
UMP words are framed using portable packet sizes; all words in each AU event list
use its enclosing render-event sample offset. Packet host timestamps are not
mapped independently. Unsupported event types/cables and generated events reject.
Faults clear supported output prefixes and retain backing tails. Cached render
blocks require the AudioUnit and caller-owned buffers to remain alive; callbacks
must stop before resource teardown.