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

◆ atomic_add_flag()

MAYAFLUX_API 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 271 of file NodeUtils.cpp.

272{
273 auto current = state.load();
274 NodeState desired;
275 do {
276 desired = static_cast<NodeState>(current | flag);
277 } while (!state.compare_exchange_weak(current, desired,
278 std::memory_order_acq_rel,
279 std::memory_order_acquire));
280}
glm::vec2 current
NodeState
Represents the processing state of a node in the audio graph.
Definition NodeSpec.hpp:43

References current.

Referenced by MayaFlux::Nodes::Node::exclude_output_from_graph(), 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::Nodes::Generator::Counter::process_sample(), MayaFlux::Buffers::FilterProcessor::process_single_sample(), MayaFlux::Nodes::Generator::Logic::pull_input_nodes(), MayaFlux::Nodes::RootNode::register_node(), and MayaFlux::Nodes::RootNode::unregister_node().

+ Here is the caller graph for this function: