struct
SushiDSP::IAudioNode
One DSP graph node. Implementations must be real-time safe in process().
- Declared in
include/SushiDSP/core/IAudioNode.hpp
Public member functions
virtual ~IAudioNode()=defaultvirtual void prepare(const PrepareInfo &info)=0Acquires all memory the node will need.
Never called on the processing thread.
Parameters
infoSample rate, max block size, and channel count for this node's lifetime.
virtual void process(ProcessContext &context)=0Fills context.outputs with exactly context.frames of audio.
Parameters
contextThe per-block input/output buffers and frame count. No allocation, no lock, no syscall, no exception.
virtual PortLayout ports() const =0Returns this node's fixed input/output channel counts.
Returns
The node's PortLayout.
virtual float get_parameter(const char *id) const =0Reads a parameter by its NodeDescriptor::parameters[].id string.
Parameters
idThe parameter's id. An unrecognized id returns 0.0f.
Returns
The parameter's current normalized value.
virtual void set_parameter_for_control_thread(const char *id, float value)=0Writes a parameter by its NodeDescriptor::parameters[].id string.
The name carries the contract the signature cannot: the string lookup is not real-time safe.
Parameters
idThe parameter's id. An unrecognized id is a no-op.
valueThe value to set, in the parameter's declared [min, max] range.
virtual void set_parameter_for_audio_thread(std::uint16_t index, float value)Writes a parameter by its NodeDescriptor::parameters[] index.
RigGraph calls it as it drains its ParameterChange ring, so an override must only store a target value; the default is a no-op for nodes with no parameters.
Parameters
indexIndex into the node's NodeDescriptor::parameters[]. Out of range is a no-op.
valueThe value to set, in the parameter's declared [min, max] range.
virtual void reset()=0Clears internal state for a click-free restart.
Control thread only, and never concurrently with process(): an implementation may reach state it otherwise only touches from the publisher side, such as an RtSwapSlot's active_for_publisher().
virtual std::uint32_t latency_samples() constSamples of delay this node adds between its input and output (FIR group delay, convolution partition, look-ahead).
Constant after prepare() unless the node documents a control-thread operation that changes it, such as CabinetNode::set_cabinet() swapping a latency-bearing stage; hosts should re-read it after any such call.
Returns
Latency in base-rate samples; 0 for a memoryless or IIR-only node.
virtual const char * type_id() constThis node's NodeDescriptor::id, for a node registered in a node_registry.
Returns
The registered type id, or "" for a node with no registry entry (e.g. a test fixture).

