Struct Prepared Dynamic Graph Output
pub struct PreparedDynamicGraphOutput { /* private fields */ }Expand description
Buffered prepared dynamic graph, reusing fixed-worker queue/event/scratch semantics. The engine must already be prepared at the exact configuration; no graph is reprepared. Offer/reclaim through its separately retained control. Swaps occur only on fresh renders after prior audio suffixes publish. Queued audio retains the old graph’s copied samples, without crossfade/tail drain. Worker start/stop precedes main engine/native retirement and endpoint drop.
Implementations§
§impl PreparedDynamicGraphOutput
impl PreparedDynamicGraphOutput
pub fn new( graph: Box<DynamicGraph>, producer: AudioProducer, config: ProcessConfig, ) -> Result<Self, GraphOutputError>
pub fn with_input(
graph: Box<DynamicGraph>,
consumer: AudioConsumer,
producer: AudioProducer,
config: ProcessConfig,
) -> Result<Self, GraphOutputError>
pub fn with_input( graph: Box<DynamicGraph>, consumer: AudioConsumer, producer: AudioProducer, config: ProcessConfig, ) -> Result<Self, GraphOutputError>
Add matching queued f32 input. Scratch, preflight, underflow and fault latch follow the fixed worker contract. Input is consumed once per fresh render.
pub fn start_audio(
&mut self,
) -> Result<GraphOutputSession<'_>, GraphOutputError>
pub fn start_audio( &mut self, ) -> Result<GraphOutputSession<'_>, GraphOutputError>
Confine dynamic native lifecycle to this worker until session finish/drop.
pub fn into_graph(self) -> Box<DynamicGraph>
pub fn into_graph(self) -> Box<DynamicGraph>
Consume stopped storage on main; retire active/pending graphs and reclaim the separate control endpoint/native owners outside worker callbacks.