Skip to main content

LiveGraphRunner

Struct LiveGraphRunner 

Source
pub struct LiveGraphRunner<P> { /* private fields */ }
Expand description

Preallocated live graph runner for host audio callbacks.

Implementations§

Source§

impl<P: Processor> LiveGraphRunner<P>

Source

pub fn new_realtime( processor: P, config: LiveGraphConfig, profile: &TransportProfile, ) -> Result<Self>

Creates a runner after validating the realtime local audio profile.

Source

pub fn new(processor: P, config: LiveGraphConfig) -> Result<Self>

Creates a runner, preparing the processor and preallocating all buffers and queues for allocation-free steady-state processing.

Source

pub fn enqueue_control_event( &mut self, event: LiveControlEvent, ) -> LiveQueuePush

Enqueues a control event for delivery on the next process call.

Source

pub fn enqueue_midi_short( &mut self, offset: u32, bytes: &[u8], ) -> Result<LiveQueuePush>

Enqueues a short MIDI control event built from bytes.

Source

pub fn enqueue_param_set( &mut self, offset: u32, param: u32, value: f64, ) -> Result<LiveQueuePush>

Enqueues a parameter-set control event.

Source

pub fn process_interleaved_f32( &mut self, input: Option<&[f32]>, output: &mut [f32], frames: usize, transport: Transport, ) -> Result<LiveProcessReport>

Processes one interleaved audio block: drains queued control events, runs the processor, and writes the interleaved output.

Source

pub fn drain_audio_events(&mut self) -> Vec<LiveAudioEvent>

Drains audio-thread events back to the control thread, appending a dropped-events marker if the queue overflowed.

Source

pub fn drain_audio_diagnostics(&mut self) -> Vec<StreamPacket>

Drains audio-thread events and renders each as a diagnostic packet.

Source

pub fn diagnostic_inspector(&self) -> Result<StreamInspectorSnapshot>

Returns a stream inspector snapshot for the audio-to-control queue.

Source

pub fn steady_state_snapshot(&self) -> LiveSteadyStateSnapshot

Captures buffer and queue capacities for steady-state growth checks.

Source

pub fn buffered_preview_chunk( &self, output: &[f32], frames: usize, sequence: u64, ) -> Result<StreamEnvelope>

Wraps an interleaved output block as a LAN buffered preview envelope.

Trait Implementations§

Source§

impl<P: Debug> Debug for LiveGraphRunner<P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<P> Freeze for LiveGraphRunner<P>
where P: Freeze,

§

impl<P> RefUnwindSafe for LiveGraphRunner<P>
where P: RefUnwindSafe,

§

impl<P> Send for LiveGraphRunner<P>
where P: Send,

§

impl<P> Sync for LiveGraphRunner<P>
where P: Sync,

§

impl<P> Unpin for LiveGraphRunner<P>
where P: Unpin,

§

impl<P> UnsafeUnpin for LiveGraphRunner<P>
where P: UnsafeUnpin,

§

impl<P> UnwindSafe for LiveGraphRunner<P>
where P: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.