Processes a single sample through the chain.
- Parameters
-
- Returns
- The output after processing through both nodes
The input is first processed by the source node, and the result is then processed by the target node.
Implements MayaFlux::Nodes::Node.
Definition at line 64 of file NodeStructure.cpp.
65{
67 return input;
68 }
71
74
76
77 uint32_t sstate =
m_Source->m_state.load();
80 } else {
83 }
84
85 uint32_t tstate =
m_Target->m_state.load();
88 } else {
92 }
93
96
99
101}
std::shared_ptr< Node > m_Source
The upstream node that processes input first.
std::shared_ptr< Node > m_Target
The downstream node that processes the source's output.
void initialize()
Initializes the chain node.
bool is_initialized() const
double m_last_output
The most recent sample value generated by this oscillator.
void atomic_add_flag(std::atomic< Utils::NodeState > &state, Utils::NodeState flag)
Atomically adds a flag to a node state.
void try_reset_processed_state(std::shared_ptr< Node > node)
Attempts to reset the processed state of a node.
void atomic_inc_modulator_count(std::atomic< uint32_t > &count, int amount)
Atomically increments the modulator count by a specified amount.
void atomic_dec_modulator_count(std::atomic< uint32_t > &count, int amount)
Atomically decrements the modulator count by a specified amount.
@ PROCESSED
Node has been processed this cycle.
References MayaFlux::Nodes::atomic_add_flag(), MayaFlux::Nodes::atomic_dec_modulator_count(), MayaFlux::Nodes::atomic_inc_modulator_count(), initialize(), is_initialized(), MayaFlux::Nodes::Node::m_last_output, m_Source, m_Target, MayaFlux::Utils::PROCESSED, and MayaFlux::Nodes::try_reset_processed_state().
Referenced by process_batch().