MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ add_input_node()

void MayaFlux::Nodes::Generator::Logic::add_input_node ( const std::shared_ptr< Node > &  node)

Appends a node whose output feeds the next input slot.

Parameters
nodeNode to read each sample

Applies in parallel input mode. Nodes fill slots 0 to n-1 in the order they were added, growing the slot count if needed. When more slots are declared than nodes, slot n receives the sample the node is driven with, for example a buffer sample from a LogicProcessor; with no nodes that sample goes to slot 0 as before. A node already processed this cycle is read, not run again.

Definition at line 595 of file Logic.cpp.

596{
597 if (!node) {
598 return;
599 }
600
601 m_input_nodes.push_back(node);
602 if (m_input_count < m_input_nodes.size()) {
604 }
605 if (m_input_buffer.size() < m_input_count) {
606 m_input_buffer.resize(m_input_count, 0.0);
607 }
608}
std::vector< std::shared_ptr< Node > > m_input_nodes
Nodes feeding the input slots in parallel input mode.
Definition Logic.hpp:714
std::vector< double > m_input_buffer
Definition Logic.hpp:712
size_t m_input_count
Expected number of inputs for multi-input mode.
Definition Logic.hpp:703

References m_input_buffer, m_input_count, and m_input_nodes.