AUDIO
Source snapshot · 12 October 2026

API reference / ravet_device::GraphOutputSession

Struct GraphOutputSession 

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<'_>

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>

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>

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>

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)

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>

Preserve published/queued audio and retain the fault on reset refusal.

pub fn finish(self)

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for GraphOutputSession<'a>

§

impl<'a> !Send for GraphOutputSession<'a>

§

impl<'a> !Sync for GraphOutputSession<'a>

§

impl<'a> !UnwindSafe for GraphOutputSession<'a>

§

impl<'a> Freeze for GraphOutputSession<'a>

§

impl<'a> Unpin for GraphOutputSession<'a>

§

impl<'a> UnsafeUnpin for GraphOutputSession<'a>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<S, T> Duplex<S> for Twhere T: FromSample<S> + ToSample<S>,

§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for Fwhere T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T, U> ToSample<U> for Twhere U: FromSample<T>,

§

fn to_sample_(self) -> U

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.