MayaFlux 0.2.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 228 of file Graph.cpp.

230{
231 auto manager = get_buffer_manager();
232 if (!manager) {
233 MF_ERROR(Journal::Component::API, Journal::Context::NodeProcessing,
234 "Buffer manager not initialized - cannot perform supply_buffer_to_channel");
235 return;
236 }
237 if (channel < manager->get_num_channels(Buffers::ProcessingToken::AUDIO_BACKEND)) {
238 manager->supply_buffer_to(buffer, Buffers::ProcessingToken::AUDIO_BACKEND, channel, mix);
239 }
240}
#define MF_ERROR(comp, ctx,...)
std::shared_ptr< Buffers::BufferManager > get_buffer_manager()
Gets the buffer manager from the default engine.
Definition Graph.cpp:111

References MayaFlux::Journal::API, MayaFlux::Buffers::AUDIO_BACKEND, 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: