AUDIO
Source snapshot · 12 October 2026

Extended portable processing

CLAP generated-event delivery

MainBusBridge::prepare_with_output accepts an independent generated capacity of 0..1024 events and an optional selected MIDI output port. process_with_output and flush_with_output supply a real host queue and return BridgeReport with DSP status plus OutputDelivery. Audio/input scratch limits remain unchanged; generated event storage is allocated separately during preparation. The original prepare/process/flush API retains zero-output policy, rejecting nonzero capacity before DSP instead of silently discarding output.

Global physical parameter values map to CLAP param-value events. Validated raw MIDI retains sample offset/bytes, with zero padding for short messages. UMP output maps to CLAP MIDI2 events with zero unused words. Portable normalized notes default to selected-port MIDI with 7-bit velocity rounding; a positive note-on rounds to at least one, and zero remains MIDI velocity zero. Exporters must advertise compatible MIDI output ports/dialects. Reserved CLAP parameter ID u32::MAX or MIDI without a selected port makes the entire generated stream unrepresentable; delivery emits nothing and reports all undelivered events.

Generated streams are preflighted for representability before touching the host queue. Successful queues retain equal-frame order. When the host rejects an event (often capacity), delivery stops immediately and reports its accepted prefix and discarded suffix. Audio/DSP/transport have already progressed and remain valid; there is no rollback, hidden retry, deferred allocation or later-block replay. Consumers explicitly own overflow diagnostics/recovery. Invalid input or a DSP fault silences audio and delivers no generated events. Parameter-only flush input uses zero-time processing; generated flush events have offset zero. Host queue callbacks can allocate or block outside this crate's control; framework paths and prepared fixture queues make no heap operations.

Four fixture groups verify parameter IDs, raw wire lengths, selected MIDI ports, normalized-note quantization, equal-frame ordering, zero-time flush, whole-stream preflight, host prefix rejection, rejected input/DSP output discard and 10000 prepared delivery callbacks. Other formats/exported MIDI output ports still need their own mappings/host evidence. See decision 0047.