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

◆ ContainerBuffer()

MayaFlux::Buffers::ContainerBuffer::ContainerBuffer ( uint32_t  channel_id,
uint32_t  num_samples,
std::shared_ptr< Kakshya::StreamContainer container,
uint32_t  source_channel = 0 
)

Construct a ContainerBuffer for a specific channel and container.

Parameters
channel_idBuffer channel index.
num_samplesNumber of samples in the buffer.
containerBacking StreamContainer.
source_channelChannel index in the container (default: 0).

Definition at line 223 of file ContainerBuffer.cpp.

226 : AudioBuffer(channel_id, num_samples)
227 , m_container(container)
228 , m_source_channel(source_channel)
229{
230 if (!m_container) {
231 throw std::invalid_argument("ContainerBuffer: container must not be null");
232 }
233
234 m_pending_adapter = std::make_shared<ContainerToBufferAdapter>(m_container);
235 std::dynamic_pointer_cast<ContainerToBufferAdapter>(m_pending_adapter)->set_source_channel(m_source_channel);
236
238}
AudioBuffer()
Creates a new uninitialized audio buffer.
std::shared_ptr< Kakshya::StreamContainer > m_container
std::shared_ptr< BufferProcessor > m_pending_adapter
void setup_zero_copy_if_possible()
Attempt to enable zero-copy operation if container layout allows.

References m_container, m_pending_adapter, m_source_channel, and setup_zero_copy_if_possible().

+ Here is the call graph for this function: