Skip to main content

CompiledGraphEngine

Struct CompiledGraphEngine 

Source
pub struct CompiledGraphEngine<T: Transcendental, const BUF_SIZE: usize> { /* private fields */ }
Expand description

Graph execution engine running a CompiledGraph.

Implementations§

Source§

impl<T: Transcendental, const BUF_SIZE: usize> CompiledGraphEngine<T, BUF_SIZE>

Source

pub fn new( graph: CompiledGraph<T, BUF_SIZE>, mailbox: Arc<Mailbox<CommandEnum>>, ) -> Self

Create a new graph engine from a compiled graph and a shared mailbox.

Source

pub fn handle(&self) -> ActorRef<CommandEnum>

Returns the actor handle for sending control commands to the engine.

Source

pub fn param_map(&self) -> HashMap<String, usize>

Returns the merged parameter map for all nodes in the engine.

The map is the first node’s mapping, which covers all parameters for single-node engines. For multi-node graphs, this returns the first node’s map only.

Source

pub fn apply_due_params(&mut self, chunk_end: u64)

Apply pending parameter updates that are due by chunk_end. Preserves sample-accurate scheduling: params with sample_pos >= chunk_end are deferred to the next tick.

Source

pub fn process_tick( &mut self, inputs: &[&[T]], outputs: &mut [&mut [T]], chunk_end: u64, ) -> ProcessResult<()>

Main processing tick — applies pending params, copies inputs, runs nodes, copies outputs.

Source

pub fn reset(&mut self)

Reset all buffers and nodes to initial state.

Trait Implementations§

Source§

impl<T: Transcendental, const BUF_SIZE: usize> Algorithm<T> for CompiledGraphEngine<T, BUF_SIZE>

Source§

fn process( &mut self, input: Option<&[T]>, output: &mut [T], ) -> ProcessResult<()>

Process one block of signal. Read more
Source§

fn reset(&mut self)

Reset the algorithm to its initial state. Read more
Source§

fn apply_command(&mut self, _value: T)

Receive a real-time command value from the control path. Read more
Source§

fn init(&mut self, _sample_rate: f32)

Initialise the algorithm with a sample rate. Read more
Source§

fn metadata(&self) -> AlgorithmMetadata

Descriptive metadata (defaults to empty).
Source§

impl<T: Transcendental, const BUF_SIZE: usize> MultichannelAlgorithm<T> for CompiledGraphEngine<T, BUF_SIZE>

Source§

fn num_inputs(&self) -> usize

Number of signal input channels.
Source§

fn num_outputs(&self) -> usize

Number of signal output channels.
Source§

fn process( &mut self, inputs: &[&[T]], outputs: &mut [&mut [T]], ) -> ProcessResult<()>

Process one buffer of samples. Read more
Source§

fn reset(&mut self)

Reset internal state.

Auto Trait Implementations§

§

impl<T, const BUF_SIZE: usize> !RefUnwindSafe for CompiledGraphEngine<T, BUF_SIZE>

§

impl<T, const BUF_SIZE: usize> !UnwindSafe for CompiledGraphEngine<T, BUF_SIZE>

§

impl<T, const BUF_SIZE: usize> Freeze for CompiledGraphEngine<T, BUF_SIZE>

§

impl<T, const BUF_SIZE: usize> Send for CompiledGraphEngine<T, BUF_SIZE>

§

impl<T, const BUF_SIZE: usize> Sync for CompiledGraphEngine<T, BUF_SIZE>

§

impl<T, const BUF_SIZE: usize> Unpin for CompiledGraphEngine<T, BUF_SIZE>
where T: Unpin,

§

impl<T, const BUF_SIZE: usize> UnsafeUnpin for CompiledGraphEngine<T, BUF_SIZE>

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> AsAny for T
where T: 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert to &dyn std::any::Any
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert to &mut dyn std::any::Any
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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

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

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V