MayaFlux 0.2.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 233 of file SoundContainerBuffer.cpp.

236 : AudioBuffer(channel_id, num_samples)
237 , m_container(container)
238 , m_source_channel(source_channel)
239{
240 if (!m_container) {
241 error<std::invalid_argument>(Journal::Component::Buffers, Journal::Context::Init,
242 std::source_location::current(),
243 "SoundContainerBuffer: container must not be null");
244 }
245
246 m_pending_adapter = std::make_shared<SoundStreamReader>(m_container);
247 std::dynamic_pointer_cast<SoundStreamReader>(m_pending_adapter)->set_source_channel(m_source_channel);
248
250}
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: