pub struct NodeExecutor {
    pub(crate) smoothers: Vec<(usize, Smoother)>,
    pub(crate) target_refresh: Vec<(usize, f32)>,
    pub(crate) prog: NodeProg,
    pub(crate) monitor_signal_cur_inp_indices: [usize; 6],
    pub(crate) sample_rate: f32,
    pub(crate) exec_ctx: NodeExecContext,
    shared: SharedNodeExec,
    injected_midi: Vec<HxMidiEvent>,
    dsp_log_init: bool,
}
Expand description

Holds the complete allocation of nodes and the program. New Nodes or the program is not newly allocated in the audio backend, but it is copied from the input ring buffer. If this turns out to be too slow, we might have to push buffers of the program around.

Fields

smoothers: Vec<(usize, Smoother)>

Contains the stand-by smoothing operators for incoming parameter changes.

target_refresh: Vec<(usize, f32)>

Contains target parameter values after a smoother finished, these will refresh the input buffers:

prog: NodeProg

Contains the to be executed nodes and output operations. Is copied from the input ringbuffer when a corresponding message arrives.

monitor_signal_cur_inp_indices: [usize; 6]

Holds the input vector indices which are to be monitored by the frontend.

sample_rate: f32

The sample rate

exec_ctx: NodeExecContext

Context that can be accessed by all (executed) nodes at runtime.

shared: SharedNodeExec

The connection with the crate::nodes::NodeConfigurator.

injected_midi: Vec<HxMidiEvent>

A small buffer for injected HxMidiEvent

dsp_log_init: bool

A flag to remember if we already initialized the logger on the audio thread.

Implementations

This is a convenience function used for testing the DSP graph output in automated tests for this crate.

The sample rate that is used to run the DSP code is 44100 Hz.

Relying on the behvaiour of this function for production code is not it’s intended usecase and changes might break your code.

  • realtime: If this is set, the function will sleep.

You can use it’s source as reference for your own audio DSP thread processing function.

This is a convenience function used for testing the DSP graph input and output in automated tests for this crate.

The sample rate that is used to run the DSP code is 44100 Hz.

Relying on the behvaiour of this function for production code is not it’s intended usecase and changes might break your code.

  • seconds: The number of seconds to run the DSP thread for.
  • realtime: If this is set, the function will sleep.

You can use it’s source as reference for your own audio DSP thread processing function.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

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