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

◆ unregister_node()

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

Removes a node from the root node of specified channels.

Parameters
nodeNode to remove
channelsVector of channel indices

Removes the node from being a child of the root node for the specified channels. Uses the default engine's node graph manager.

Definition at line 100 of file Graph.cpp.

101{
102 auto manager = get_node_graph_manager();
103 if (!manager) {
104 MF_ERROR(Journal::Component::API, Journal::Context::NodeProcessing,
105 "Node graph manager not initialized - cannot register node");
106 return;
107 }
108
109 if (channel >= manager->get_channel_count(token)) {
110 MF_ERROR(Journal::Component::API, Journal::Context::NodeProcessing,
111 "Channel index out of range for audio node registration");
112 }
113 manager->remove_from_root(node, token, channel);
114}
#define MF_ERROR(comp, ctx,...)
std::shared_ptr< Nodes::NodeGraphManager > get_node_graph_manager()
Gets the node graph manager from the default engine.
Definition Graph.cpp:51

References MayaFlux::Journal::API, get_node_graph_manager(), MF_ERROR, and MayaFlux::Journal::NodeProcessing.

Referenced by MayaFlux::Nodes::RootNode::terminate_all_nodes().

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