Skip to main content

Process

Trait Process 

Source
pub trait Process<M = (), S = f32> {
    // Required methods
    fn inlets(&self) -> &[Port];
    fn outlets(&self) -> &[Port];
    fn process(&mut self, cx: &mut ProcessContext<'_, '_, M, S>);
}
Expand description

A patch object. The patch selects a common message type M and signal sample type S. Each object owns its state between calls.

Required Methods§

Source

fn inlets(&self) -> &[Port]

Inlets in left-to-right patch order. The layout stays fixed while connected.

Source

fn outlets(&self) -> &[Port]

Outlets in left-to-right patch order. The layout stays fixed while connected.

Source

fn process(&mut self, cx: &mut ProcessContext<'_, '_, M, S>)

Process the supplied signals and messages. On the audio thread this work must be bounded, allocation-free and nonblocking.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§