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

◆ connect_node_to_audio_channel()

void MayaFlux::Buffers::BufferProcessingControl::connect_node_to_audio_channel ( const std::shared_ptr< Nodes::Node > &  node,
ProcessingToken  token,
uint32_t  channel,
float  mix = 0.5F,
bool  clear_before = false 
)

Connects a node to a specific audio token and channel.

Parameters
nodeNode to connect
tokenProcessing domain
channelChannel index
mixMix level (default: 0.5)
clear_beforeWhether to clear buffer before adding node output (default: false)

Creates a NodeSourceProcessor that feeds node output into the channel.

Definition at line 281 of file BufferProcessingControl.cpp.

287{
289
290 auto processor = std::make_shared<NodeSourceProcessor>(node, mix, clear_before);
291 processor->set_processing_token(token);
292
293 add_audio_processor_to_channel(processor, token, channel);
294}
static MayaFlux::Nodes::ProcessingToken token
Definition Timers.cpp:8
void ensure_audio_channels(ProcessingToken token, uint32_t channel_count)
Ensures minimum number of audio channels exist for a token.
void add_audio_processor_to_channel(const std::shared_ptr< BufferProcessor > &processor, ProcessingToken token, uint32_t channel)
Adds a processor to a specific audio token and channel.
BufferAccessControl & m_access_control
Reference to the buffer access control.
std::vector< double > mix(const std::vector< std::vector< double > > &streams)
Mix multiple data streams with equal weighting.
Definition Yantra.cpp:1019

References add_audio_processor_to_channel(), MayaFlux::Buffers::BufferAccessControl::ensure_audio_channels(), m_access_control, MayaFlux::mix(), and token.

+ Here is the call graph for this function: