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

◆ bind_audio_buffer()

void MayaFlux::Kakshya::PlotProcessor::bind_audio_buffer ( uint32_t  series_index,
std::shared_ptr< Buffers::AudioBuffer buffer 
)

Bind a series slot to an AudioBuffer.

Each process() copies the full buffer span into the series. Series size is resized to match the buffer on the first process() call.

Parameters
series_indexIndex returned by PlotContainer::add_series().
bufferAudioBuffer to read from.

Definition at line 39 of file PlotProcessor.cpp.

41{
42 if (!buffer) {
43 MF_ERROR(C, X, "PlotProcessor::bind_audio_buffer: null buffer for series {}", series_index);
44 return;
45 }
46 auto& b = m_bindings[series_index];
47 b.source_type = SourceType::AUDIO_BUFFER;
48 b.audio_buffer = std::move(buffer);
49 b.node.reset();
50 b.network.reset();
51 b.callable = {};
52}
#define MF_ERROR(comp, ctx,...)
size_t b
std::unordered_map< uint32_t, SeriesBinding > m_bindings

References AUDIO_BUFFER, b, m_bindings, and MF_ERROR.