Processes a single sample through both nodes and combines the results.
- Parameters
-
- Returns
- The combined output after processing through both nodes
The input is processed by both the left and right nodes, and their outputs are combined using the specified function.
Implements MayaFlux::Nodes::Node.
Definition at line 229 of file NodeStructure.cpp.
230{
232 return input;
233 }
234
237
240
241 uint32_t lstate =
m_lhs->m_state.load();
244 } else {
247 }
248
249 uint32_t rstate =
m_rhs->m_state.load();
252 } else {
255 }
256
258
261
264
267
269}
void initialize()
Initializes the binary operation node.
bool is_initialized() const
void notify_tick(double value) override
Notifies all registered callbacks about a new output value.
std::shared_ptr< Node > m_lhs
The left-hand side node.
CombineFunc m_func
The function used to combine the outputs of both nodes.
double m_last_rhs_value
The last output value from the right-hand side node.
double m_last_lhs_value
The last output value from the left-hand side node.
std::shared_ptr< Node > m_rhs
The right-hand side node.
double m_last_output
The most recent sample value generated by this oscillator.
bool m_fire_events_during_snapshot
Internal flag controlling whether notify_tick fires during state snapshots Default: false (events don...
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_fire_events_during_snapshot, m_func, m_last_lhs_value, MayaFlux::Nodes::Node::m_last_output, m_last_rhs_value, m_lhs, m_rhs, m_state_saved, notify_tick(), MayaFlux::Utils::PROCESSED, and MayaFlux::Nodes::try_reset_processed_state().
Referenced by process_batch().