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

◆ SamplingPipeline() [1/2]

MayaFlux::Kriya::SamplingPipeline::SamplingPipeline ( std::shared_ptr< Kakshya::DynamicSoundStream stream,
Buffers::BufferManager mgr,
Vruta::TaskScheduler scheduler,
uint32_t  channel,
uint32_t  buf_size 
)

Begin construction with a loaded stream and output channel.

Parameters
streamLoaded DynamicSoundStream.
mgrBufferManager for channel supply.
schedulerScheduler for the internal BufferPipeline.
channelOutput channel index.
buf_sizeEngine buffer size in frames.

After construction, optionally call pipeline() and capture() to configure the fluent chain, then call build() to start processing. If build() is never called, the destructor is a no-op.

Definition at line 11 of file SamplingPipeline.cpp.

17 : m_stream(std::move(stream))
18 , m_processor(std::make_shared<Buffers::StreamSliceProcessor>())
19 , m_mgr(mgr)
20 , m_capture(nullptr)
21 , m_scheduler(scheduler)
23 , m_buf_size(buf_size)
24{
25 m_buffer = std::make_shared<Buffers::AudioBuffer>(channel, buf_size);
26
27 m_buffer->set_default_processor(m_processor);
28
29 m_capture = CaptureBuilder(m_buffer);
31
33 m_processor->set_on_end([this](size_t) {
34 if (!any_active())
35 m_pipeline->stop_continuous();
36 });
37}
uint32_t channel
static std::shared_ptr< BufferPipeline > create(Vruta::TaskScheduler &scheduler, std::shared_ptr< Buffers::BufferManager > buffer_manager=nullptr)
CaptureBuilder & on_capture_processing()
Set processing control to ON_CAPTURE mode.
Definition Capture.cpp:89
CaptureBuilder & for_cycles(uint32_t count)
Set number of cycles to capture (enables ACCUMULATE mode).
Definition Capture.cpp:107
std::shared_ptr< Buffers::AudioBuffer > m_buffer
std::shared_ptr< Kakshya::DynamicSoundStream > m_stream
std::shared_ptr< Buffers::StreamSliceProcessor > m_processor
std::shared_ptr< BufferPipeline > m_pipeline

References any_active(), channel, MayaFlux::Kriya::BufferPipeline::create(), MayaFlux::Kriya::CaptureBuilder::for_cycles(), m_buffer, m_capture, m_pipeline, m_processor, m_scheduler, and MayaFlux::Kriya::CaptureBuilder::on_capture_processing().

+ Here is the call graph for this function: