MayaFlux 0.5.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 76 of file BufferManager.cpp.

81{
82 if (!m_unit_manager->has_audio_unit(token)) {
83 return;
84 }
85
86 auto& unit = m_unit_manager->get_audio_unit_mutable(token);
87 if (channel >= unit.channel_count) {
88 return;
89 }
90
91 auto root_buffer = unit.get_buffer(channel);
92
93 if (!node_output_data.empty()) {
94 root_buffer->set_node_output(node_output_data);
95 }
96
97 for (auto& child : root_buffer->get_child_buffers()) {
98 if (child->needs_default_processing()) {
99 child->process_default();
100 }
101
102 if (auto processing_chain = child->get_processing_chain()) {
103 if (child->has_data_for_cycle()) {
104 processing_chain->process_complete(child);
105 }
106 }
107 unit.get_chain(channel)->process_complete(child);
108 }
109
110 root_buffer->process_default();
111
112 unit.get_chain(channel)->process(root_buffer);
113
114 m_global_processing_chain->process(root_buffer);
115
116 if (auto chain = root_buffer->get_processing_chain()) {
117 chain->process_final(root_buffer);
118 }
119}
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.
Tendency< A, C > chain(const Tendency< A, B > &first, const Tendency< B, C > &second)
Sequential composition: evaluate first, feed result into second.
Definition Tendency.hpp:82

References m_global_processing_chain, and m_unit_manager.

Referenced by process_audio_token_default().

+ Here is the caller graph for this function: