pub struct DSPNodeContext { /* private fields */ }
Expand description

This table holds all the DSP state including the state of the individual DSP nodes that were created by the [crate::jit::DSPFunctionTranslator].

Implementations

Creates a new DSPNodeContext that you can pass into crate::JIT::new.

Enabled debug information collection. See also DSPNodeContext::get_ir_dump.

Returns if debug is enabled.

If DSPNodeContext::set_debug is enabled, this will return the most recent IR code for the most recently compiled DSPFunction.

Returns you a reference to the specified atom connected with the DSP backend. These atoms can be read and written in the DSPFunction using the atomr and atomw nodes.

Retrieve the index into the most recently compiled DSPFunction. To be used by DSPFunction::access_persistent_var.

Tries to send a new table to the backend. You have to make sure the table has exactly the same size as the previous table given in the [DSPContextConfig]. Otherwise a [DSPNodeContextError] is returned.

If you received a DSPFunction back from the audio thread, you should pass it into this function. It will make sure to purge old unused [DSPNodeState] instances.

You must call this after all DSPFunction instances compiled with this state are done executing. If you don’t call this, you might get a memory leak. The API is a bit manual at this point, because usually DSPFunction will be executed on a different thread, and synchronizing this would come with additional overhead that I wanted to save.

Trait Implementations

Executes the destructor for this type. Read more

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.