Runs a real pulp::format::Processor as a node inside the routed graph.
More...
#include <processor_node_adapter.hpp>
Runs a real pulp::format::Processor as a node inside the routed graph.
ProcessorNode is the in-process adapter between a routed graph node and the legacy Processor::process() ABI. It owns nothing about routing: the graph's GraphRuntimeExecutor still gathers a node's inputs and assigns its output slots; ProcessorNode only translates the per-node routed I/O the executor hands it into a ProcessBlock and forwards to process_processor_block(). There is no second routing path — a ProcessorNode is wired into a snapshot exactly like any other GraphRuntimeNodeBinding.
The binding attaches gathered sparse parameter events, MIDI, and borrowed dense modulation lanes through one EventBlock. Legacy processors still enter through process_processor_block(); processors that declare dense consumption enter through Processor::process_block().
Lifetime: the wrapped Processor is non-owning and must outlive the node and every routed block that references it. prepare() runs off the realtime thread and must precede the first process_binding() call.
◆ ProcessorNode()
| pulp::format::ProcessorNode::ProcessorNode |
( |
Processor & | processor | ) |
|
|
inlineexplicitnoexcept |
Wrap a non-owning processor.
The processor must already have its StateStore bound (see HeadlessHost / format adapters) before prepare().
◆ binding()
Build the only valid graph binding for this adapter.
The cached capability selects dense views or the legacy event expansion.
◆ prepare()
| bool pulp::format::ProcessorNode::prepare |
( |
const PrepareContext & | context | ) |
|
Off-RT preparation: prepares the wrapped processor for the given audio configuration and sizes the block-adapter scratch so process_binding() stays allocation-free.
Idempotent enough to re-run when the configuration changes; call with the audio thread stopped. Call release() before re-preparing this non-owning adapter.
◆ process_binding()
Routed node binding entry point.
user_data must be the owning ProcessorNode. Reads the executor's gathered mono input view (ctx.node_inputs) and writes this node's mono output view (ctx.node_outputs) by aliasing them into a block-local ProcessBlock over the node's reused bus set, then forwards to process_processor_block(). Allocation-free per block and only valid on the routed path (ctx.routed == true).
◆ processor() [1/2]
| const Processor & pulp::format::ProcessorNode::processor |
( |
| ) |
const |
|
inlinenoexcept |
◆ processor() [2/2]
| Processor & pulp::format::ProcessorNode::processor |
( |
| ) |
|
|
inlinenoexcept |
◆ release()
| bool pulp::format::ProcessorNode::release |
( |
| ) |
|
|
noexcept |
◆ set_audio_input_provider()
Install a host-owned route provider before prepare().
The handle is copied as a small immutable POD and read from the audio thread without allocation or locking. Clearing it requires the audio thread to be stopped and the node to be prepared again.
The documentation for this class was generated from the following file: