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

◆ process_channel()

void MayaFlux::Buffers::BufferManager::process_channel ( ProcessingToken  token,
uint32_t  channel,
uint32_t  processing_units,
const std::vector< double > &  node_output_data = {} 
)

Processes a specific channel within a token domain.

Parameters
tokenProcessing domain
channelChannel index (audio-specific)
processing_unitsNumber of processing units to process
node_output_dataOptional output data from a node

Definition at line 71 of file BufferManager.cpp.

76{
77 if (!m_unit_manager->has_audio_unit(token)) {
78 return;
79 }
80
81 auto& unit = m_unit_manager->get_audio_unit_mutable(token);
82 if (channel >= unit.channel_count) {
83 return;
84 }
85
86 auto root_buffer = unit.get_buffer(channel);
87
88 if (!node_output_data.empty()) {
89 root_buffer->set_node_output(node_output_data);
90 }
91
92 for (auto& child : root_buffer->get_child_buffers()) {
93 if (child->needs_default_processing()) {
94 child->process_default();
95 }
96
97 if (auto processing_chain = child->get_processing_chain()) {
98 if (child->has_data_for_cycle()) {
99 processing_chain->process(child);
100 }
101 }
102 }
103
104 root_buffer->process_default();
105
106 unit.get_chain(channel)->process(root_buffer);
107
108 m_global_processing_chain->process(root_buffer);
109
110 if (auto chain = root_buffer->get_processing_chain()) {
111 chain->process_final(root_buffer);
112 }
113}
static MayaFlux::Nodes::ProcessingToken token
Definition Timers.cpp:8
std::shared_ptr< BufferProcessingChain > m_global_processing_chain
Global processing chain applied to all tokens.
std::unique_ptr< TokenUnitManager > m_unit_manager
Token/unit storage and lifecycle.

References m_global_processing_chain, m_unit_manager, and token.

Referenced by process_audio_token_default().

+ Here is the caller graph for this function: