MayaFlux 0.2.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 81 of file Graph.cpp.

82{
83 auto manager = get_node_graph_manager();
84 if (!manager) {
85 MF_ERROR(Journal::Component::API, Journal::Context::NodeProcessing,
86 "Node graph manager not initialized - cannot register node");
87 return;
88 }
89
90 if (channel >= manager->get_channel_count(token)) {
91 MF_ERROR(Journal::Component::API, Journal::Context::NodeProcessing,
92 "Channel index out of range for audio node registration");
93 }
94 manager->remove_from_root(node, token, channel);
95}
#define MF_ERROR(comp, ctx,...)
static MayaFlux::Nodes::ProcessingToken token
Definition Timers.cpp:8
std::shared_ptr< Nodes::NodeGraphManager > get_node_graph_manager()
Gets the node graph manager from the default engine.
Definition Graph.cpp:31

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

+ Here is the call graph for this function: