pub struct ProcessContext<'call, 'output, M = (), S = f32> {
pub frames: usize,
pub inputs: &'call [&'call [S]],
pub outputs: &'call mut [&'output mut [S]],
pub events: &'call [Event<M>],
pub emit: &'call mut dyn FnMut(Event<M>) -> Result<(), Event<M>>,
}Expand description
Borrowed signals and messages for one call. The output table can be reborrowed independently of its sample storage.
Fields§
§frames: usizeNumber of frames in every signal buffer. A zero-frame call delivers messages at offset zero without advancing audio time.
inputs: &'call [&'call [S]]One shared buffer per signal inlet, in inlet order. For inlets
[Message, Signal], buffer zero belongs to inlet one.
outputs: &'call mut [&'output mut [S]]One exclusive buffer per signal outlet, in outlet order. The processor overwrites every frame. An additive renderer clears its output first.
events: &'call [Event<M>]Messages in nondecreasing frame order. Apply ties in slice order.
In a nonempty block, offsets are less than frames. An event at the
end belongs to the next block.
emit: &'call mut dyn FnMut(Event<M>) -> Result<(), Event<M>>Emit in frame order on a message outlet. The host maps the outlet to downstream inlets and preserves the frame offset and emission order. Return the original event if the host cannot accept it.