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

◆ SoundContainerBuffer()

MayaFlux::Buffers::SoundContainerBuffer::SoundContainerBuffer ( uint32_t  channel_id,
uint32_t  num_samples,
const std::shared_ptr< Kakshya::StreamContainer > &  container,
uint32_t  source_channel = 0 
)

Construct a SoundContainerBuffer 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 191 of file SoundContainerBuffer.cpp.

194 : AudioBuffer(channel_id, num_samples)
195 , m_container(container)
196 , m_source_channel(source_channel)
197{
198 if (!m_container) {
199 error<std::invalid_argument>(Journal::Component::Buffers, Journal::Context::Init,
200 std::source_location::current(),
201 "SoundContainerBuffer: container must not be null");
202 }
203
204 m_pending_adapter = std::make_shared<SoundStreamReader>(m_container);
205 std::dynamic_pointer_cast<SoundStreamReader>(m_pending_adapter)->set_source_channel(m_source_channel);
206
208}
AudioBuffer()
Creates a new uninitialized audio buffer.
void setup_zero_copy_if_possible()
Attempt to enable zero-copy operation if container layout allows.
std::shared_ptr< Kakshya::StreamContainer > m_container
std::shared_ptr< BufferProcessor > m_pending_adapter
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::Buffers, MayaFlux::Journal::Init, m_container, m_pending_adapter, m_source_channel, and setup_zero_copy_if_possible().

+ Here is the call graph for this function: