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

◆ atomic_add_flag()

void MayaFlux::Nodes::atomic_add_flag ( std::atomic< NodeState > &  state,
NodeState  flag 
)

Atomically adds a flag to a node state.

Parameters
stateThe atomic node state to modify
flagThe flag to add to the state

Adds a specific state flag to a node's state without affecting other state flags. This is used to mark nodes with specific conditions (like PROCESSED or ACTIVE) while preserving other aspects of the node's current state.

Definition at line 94 of file NodeUtils.cpp.

95{
96 auto current = state.load();
97 NodeState desired;
98 do {
99 desired = static_cast<NodeState>(current | flag);
100 } while (!state.compare_exchange_weak(current, desired,
101 std::memory_order_acq_rel,
102 std::memory_order_acquire));
103}
NodeState
Represents the processing state of a node in the audio graph.
Definition NodeSpec.hpp:43

Referenced by MayaFlux::Nodes::Generator::Generator::enable_mock_process(), MayaFlux::Nodes::RootNode::process_frame(), MayaFlux::Nodes::RootNode::process_sample(), MayaFlux::Nodes::ChainNode::process_sample(), MayaFlux::Nodes::BinaryOpNode::process_sample(), MayaFlux::Nodes::CompositeOpNode< N >::process_sample(), MayaFlux::Nodes::Filters::FIR::process_sample(), MayaFlux::Nodes::Filters::IIR::process_sample(), MayaFlux::Nodes::Generator::Impulse::process_sample(), MayaFlux::Nodes::Generator::Logic::process_sample(), MayaFlux::Nodes::Generator::Phasor::process_sample(), MayaFlux::Nodes::Generator::Polynomial::process_sample(), MayaFlux::Nodes::Generator::Sine::process_sample(), MayaFlux::Buffers::FilterProcessor::process_single_sample(), MayaFlux::Nodes::RootNode::register_node(), and MayaFlux::Nodes::RootNode::unregister_node().

+ Here is the caller graph for this function: