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

◆ register_audio_node() [2/2]

MAYAFLUX_API void MayaFlux::register_audio_node ( const std::shared_ptr< Nodes::Node > &  node,
uint32_t  channel = 0 
)

Adds a node to the root node of a specific channel.

Parameters
nodeNode to add
channelChannel index

Adds the node as a child of the root node for the specified channel. Uses the default engine's node graph manager.

Definition at line 23 of file Graph.cpp.

24{
25 auto manager = get_node_graph_manager();
26 if (channel >= manager->get_channel_count(Nodes::ProcessingToken::AUDIO_RATE)) {
27 std::out_of_range err("Channel index out of range for audio node registration");
28 std::cerr << err.what() << '\n';
29 }
30 manager->add_to_root(node, Nodes::ProcessingToken::AUDIO_RATE, channel);
31}
std::shared_ptr< Nodes::NodeGraphManager > get_node_graph_manager()
Gets the node graph manager from the default engine.
Definition Graph.cpp:18

References MayaFlux::Nodes::AUDIO_RATE, and get_node_graph_manager().

Referenced by create_node(), MayaFlux::Nodes::ChainNode::initialize(), MayaFlux::Nodes::BinaryOpNode::initialize(), MayaFlux::Kriya::operator>>(), and register_audio_node().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: