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 282 of file Graph.cpp.

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

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: