Add a network to a processing token.
Networks are processed parallel to RootNodes, managing their own internal node coordination and processing.
451{
452 if (!network) {
453 return;
454 }
455
457
458 network->set_enabled(true);
459
461 uint32_t channel_mask = network->get_channel_mask();
462
463 if (channel_mask == 0) {
464 channel_mask = 1;
465 network->add_channel_usage(0);
466 }
467
468 auto channels = network->get_registered_channels();
470
471 for (auto ch : channels) {
475 "Added audio network to token {} channel {}: {} nodes",
476 static_cast<int>(
token), ch, network->get_node_count());
477 }
478
479 } else {
481
484 "Added network to token {}: {} nodes, mode={}",
485 static_cast<int>(
token),
486 network->get_node_count(),
487 static_cast<int>(network->get_output_mode()));
488 }
489}
#define MF_INFO(comp, ctx,...)
static MayaFlux::Nodes::ProcessingToken token
@ AUDIO_SINK
Aggregated audio samples sent to output.
std::unordered_map< ProcessingToken, std::vector< std::shared_ptr< Network::NodeNetwork > > > m_token_networks
Non-audio networks (token-level processing) For NONE, GRAPHICS_BIND, CUSTOM output modes.
void register_network_global(const std::shared_ptr< Network::NodeNetwork > &network)
Register network globally (like nodes)
void ensure_root_exists(ProcessingToken token, unsigned int channel)
Ensures a root node exists for the given token and channel.
std::unordered_map< ProcessingToken, std::vector< std::shared_ptr< Network::NodeNetwork > > > m_audio_networks
Audio-sink networks Only populated for networks with OutputMode::AUDIO_SINK.
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.