Block-start host transport¶
RavetAuTransport.hpp collects a NativeAuTransportSnapshot directly from
Apple's HostCallbackInfo during the host's serialized AudioUnitRender. The
snapshot exposes read-only canonical native fields through transport() and
successful callback kinds through callbacks(). Missing callbacks and callbacks
returning an error produce unavailable tuples; successful independent tuples
remain available. TransportState2 takes precedence over legacy TransportState,
with no fallback after an error. Every supported supplied callback is called at
most once. Host callback/user-data lifetime and coherence across separate callbacks
remain host responsibilities; callbacks may allocate or block.
The collector initializes requested return fields to invalid scalar/Boolean sentinels before invoking the host. Integer-bit initialization and IEEE finite classification preserve these checks under fast-math. A callback returning success with missing or malformed required values rejects the entire collection without changing the previous output snapshot. Beat/tempo requires finite beat and finite positive tempo. Signature requests only numerator/denominator: both must be nonzero and fit u16, and the floating numerator must be integral before conversion. AU clock/bar-start fields do not provide the exact native bar-number pair, so the helper does not request or infer them.
Transport samples must be finite, exactly integral and in [-2^63, +2^63) before
integer conversion. Exact -2^63 and the last representable Float64 below +2^63
are accepted; +2^63, the next value below -2^63, fractional and nonfinite
coordinates reject. Host Float64 precision is inherited, without recovery of
integers already rounded by the host. Playing, changed/discontinuity and cycling
are strict 0/1 Booleans; recording is known only from TransportState2. Active loop
bounds must be finite and strictly ordered; they become native beat-loop fields
only when a beat coordinate is also known. Inactive irrelevant loop bounds are
ignored. Native signature requires DETAILS in the canonical ABI, so signature-only
snapshots also carry DETAILS with unknown/default flags. Native DETAILS has no
per-flag availability: zero pre-roll for all callback profiles and zero recording
for legacy transport are unknown/default placeholders,
not host-known false values. Consumers needing the distinction must interpret the
callbacks() sidecar: only TransportState2 supplies recording, and neither
callback supplies pre-roll or native sample-loop coordinates. Do not treat every
false DETAILS flag as a host-known false value. No extrapolation, inferred
bar number or automatic voice reset follows a discontinuity.
The optional external-SDK RavetAuVst3Transport.hpp projects a successfully
collected snapshot into a caller-owned ProcessContext. A nonnull VST3 context
implies known playing and sample coordinates; the projector therefore returns
null unless both are actually known, leaving the prior context unchanged. Partial
beat/tempo/signature data remains available in the direct native snapshot but is
explicitly omitted from that bridge. Complete snapshots project music, tempo,
signature, playing, actual recording and available active beat-loop data.
Discontinuity and exact per-callback availability have no VST3 representation and
are omitted. Finite positive prepared sample rate is required; no system clock,
bar number, sample-loop or pre-roll is invented. Collection and projection use
fixed local storage without their own heap activity.
Performance AU collects and projects after audio/note preflight and before moving pending SDK parameter intent or invoking native processing. Malformed successful host callbacks reject with the existing supported-prefix silence, preserving accepted pending notes/controls and native voice history for a later render. Callback errors or absence are valid unknown transport. AUBase owns its timestamp render cache, including caching a failed render timestamp: recovery uses a new render timestamp; the helper does not promise same-timestamp retry. The performance DSP currently ignores transport, so fixture evidence establishes the boundary and retained scheduling, not transport-driven musical behavior.
Existing native performance zero-frame processing supplies authoritative Rust codec acceptance for complete, signature-only, beat/tempo-only, legacy-only and unknown collected snapshots. Corrupting signature dependencies, reserved fields or unused coordinates rejects through that same ABI; no new native API is added. The direct transport fixture covers independently available/error/absent callback tuples, initialized missing returns, legacy/State2 precedence, native availability, safe SDK omission, integer/fractional/nonfinite boundaries, signature/Boolean/ loop faults and 4,000 accepted plus rejected collections/projections with zero counted ordinary C++ new/delete actions, also under optimized fast-math. Actual packaged-component tests set typed host callbacks and check rejection silence, queued timed MIDI/Level recovery, initialized returns and callback counts in both mono and stereo. These are local macOS arm64 synthetic checks, with no DAW, cross-callback host coherence, all-host/backend allocation or deadline claim. See decision 0188.