75 void add_to_root(
const std::shared_ptr<Node>& node,
ProcessingToken token,
unsigned int channel = 0);
86 void remove_from_root(
const std::shared_ptr<Node>& node,
ProcessingToken token,
unsigned int channel = 0);
100 auto node = get_node(node_id);
102 add_to_root(node,
token, channel);
117 std::function<
void(std::span<RootNode*>)> processor);
128 const std::unordered_map<unsigned int, std::shared_ptr<RootNode>>& get_all_channel_root_nodes(
ProcessingToken token = ProcessingToken::AUDIO_RATE)
const;
148 template <
typename NodeType,
typename... Args>
149 inline std::shared_ptr<NodeType>
create_node(
const std::string&
id, Args&&... args)
151 auto node = std::make_shared<NodeType>(std::forward<Args>(args)...);
152 m_Node_registry[id] = node;
165 std::shared_ptr<Node> get_node(
const std::string&
id);
182 void connect(
const std::string& source_id,
const std::string& target_id);
192 bool is_node_registered(
const std::shared_ptr<Node>& node);
240 std::vector<double> process_channel(
ProcessingToken token,
unsigned int channel,
unsigned int num_samples);
265 std::unordered_map<unsigned int, std::vector<double>> process_token_with_channel_data(
303 void process_all_tokens(
unsigned int num_samples = 1);
312 std::vector<ProcessingToken> get_active_tokens()
const;
335 void print_summary()
const;
357 void remove_network(
const std::shared_ptr<Network::NodeNetwork>& network,
ProcessingToken token);
364 [[nodiscard]] std::vector<std::shared_ptr<Network::NodeNetwork>> get_networks(
ProcessingToken token, uint32_t channel = 0)
const;
371 [[nodiscard]] std::vector<std::shared_ptr<Network::NodeNetwork>> get_all_networks(
ProcessingToken token)
const;
386 void register_network_global(
const std::shared_ptr<Network::NodeNetwork>& network);
391 void unregister_network_global(
const std::shared_ptr<Network::NodeNetwork>& network);
403 std::vector<std::vector<double>> process_audio_networks(
ProcessingToken token, uint32_t num_samples, uint32_t channel = 0);
411 void terminate_active_processing();
438 std::unordered_map<unsigned int, std::shared_ptr<RootNode>>>
449 std::function<void(std::span<RootNode*>)>>
482 std::vector<std::shared_ptr<Network::NodeNetwork>>>
489 std::unordered_map<ProcessingToken, std::vector<std::shared_ptr<Network::NodeNetwork>>>
499 std::atomic<bool> m_terminate_requested {
false };
526 void register_global(
const std::shared_ptr<Node>& node);
533 void set_channel_mask(
const std::shared_ptr<Node>& node, uint32_t channel_id);
542 void unset_channel_mask(
const std::shared_ptr<Node>& node, uint32_t channel_id);
550 void unregister_global(
const std::shared_ptr<Node>& node);
559 void normalize_sample(
double& sample, uint32_t num_nodes);
564 bool is_network_registered(
const std::shared_ptr<Network::NodeNetwork>& network);