Struct Graph Output Session
pub struct GraphOutputSession<'a> { /* private fields */ }Expand description
Non-Send borrowed graph worker session. Rendering/publishing are bounded and heap-free; worker wake/sleep, graph reset, queue/device rate matching and shutdown/join remain explicit. Queue underruns are handled by RingOutput.
use ravet_device::GraphOutputSession;
fn require_send<T: Send>() {}
require_send::<GraphOutputSession<'static>>();Implementations§
§impl GraphOutputSession<'_>
impl GraphOutputSession<'_>
pub fn pump(
&mut self,
transport: Transport,
) -> Result<GraphOutputProgress, GraphStatus>
pub fn pump( &mut self, transport: Transport, ) -> Result<GraphOutputProgress, GraphStatus>
Render one fixed block only after the prior suffix has been published. Transport applies only to a new render; it is not a device timestamp. Graph faults publish none of the faulty block and may follow native history advancement. No retry, reset, spin, sleep or I/O occurs here.
pub fn pump_events(
&mut self,
events: &[Event],
transport: Transport,
) -> Result<GraphOutputProgress, GraphStatus>
pub fn pump_events( &mut self, events: &[Event], transport: Transport, ) -> Result<GraphOutputProgress, GraphStatus>
Supply ordered sample-offset input for one fresh render. While draining retained audio, inputs/transport are untouched and progress acknowledges no event consumption. Keep those inputs until a later fresh render. Validation occurs through the graph before processing; faults may follow earlier node mutation and must not be treated as a safe delivery retry. No cross-thread queue, device-clock conversion or event retiming is inferred.
pub fn pump_io(
&mut self,
events: &[Event],
transport: Transport,
storage: &mut [Event],
) -> Result<GraphOutputProgress, GraphStatus>
pub fn pump_io( &mut self, events: &[Event], transport: Transport, storage: &mut [Event], ) -> Result<GraphOutputProgress, GraphStatus>
Supply bounded output storage of exactly the prepared capacity for each fresh render. Only the returned output_event_count prefix is valid; storage tails and pending-call storage remain untouched. Output is produced once per new render, even when queue publication is partial or currently zero. Caller owns control-thread delivery and any correlation with queued audio. Errors provide no valid output prefix and may follow native input/history mutation and queued input consumption. Malformed outer blocks reject before dequeuing input. Graph faults retain their error until reset, with no further queue consumption/publication; earlier input/history cannot be rolled back. No telemetry queue, replay, coalescing or acknowledgement is inferred.
pub fn last_swap(&self) -> Option<GraphSwapStatus>
pub fn last_swap(&self) -> Option<GraphSwapStatus>
Most recent dynamic graph processing handoff outcome, including a swap followed by a processing fault. None before processing or for fixed graphs. Pending publication, outer rejection and fault-latch calls preserve this historical value; use progress.swap for successful current-call outcomes.
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset graph histories on their owner; queued and retained audio is not discarded. Stop/join both endpoints before explicitly clearing a queue.
pub fn try_reset(&mut self) -> Result<(), GraphStatus>
pub fn try_reset(&mut self) -> Result<(), GraphStatus>
Preserve published/queued audio and retain the fault on reset refusal.