MayaFlux 1.0.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 48 of file PlotProcessor.cpp.

50{
51 if (!buffer) {
52 MF_ERROR(C, X, "PlotProcessor::bind_audio_buffer: null buffer for series {}", series_index);
53 return;
54 }
55 auto& b = m_bindings[series_index];
56 b.source_type = SourceType::AUDIO_BUFFER;
57 b.audio_buffer = std::move(buffer);
58 release_node(b);
59 b.network.reset();
60 b.callable = {};
61}
#define MF_ERROR(comp, ctx,...)
std::shared_ptr< NetworkGeometryBuffer > buffer
size_t b
std::unordered_map< uint32_t, SeriesBinding > m_bindings

References AUDIO_BUFFER, b, buffer, m_bindings, and MF_ERROR.