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

◆ supply_buffer_to_channel()

MAYAFLUX_API void MayaFlux::supply_buffer_to_channel ( const std::shared_ptr< Buffers::AudioBuffer > &  buffer,
uint32_t  channel,
double  mix = 1.0 
)

Supplies a buffer to a single channel with mixing.

Parameters
bufferSource buffer to supply
channelTarget channel index
mixMix level (default: 1.0)

Convenience wrapper for single-channel buffer supply operations.

Definition at line 283 of file Graph.cpp.

285{
286 auto manager = get_buffer_manager();
287 if (!manager) {
288 MF_ERROR(Journal::Component::API, Journal::Context::NodeProcessing,
289 "Buffer manager not initialized - cannot perform supply_buffer_to_channel");
290 return;
291 }
292 if (channel < manager->get_num_channels(Buffers::ProcessingToken::AUDIO_BACKEND)) {
293 manager->supply_buffer_to(buffer, Buffers::ProcessingToken::AUDIO_BACKEND, channel, mix);
294 }
295}
#define MF_ERROR(comp, ctx,...)
uint32_t channel
std::shared_ptr< Buffers::BufferManager > get_buffer_manager()
Gets the buffer manager from the default engine.
Definition Graph.cpp:133

References MayaFlux::Journal::API, MayaFlux::Buffers::AUDIO_BACKEND, channel, get_buffer_manager(), MF_ERROR, mix(), and MayaFlux::Journal::NodeProcessing.

Referenced by supply_buffer_to_channels().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: