|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Pipeline-coordinated polyphonic playback of a bounded audio stream. More...
#include <SamplingPipeline.hpp>
Collaboration diagram for MayaFlux::Kriya::SamplingPipeline:Public Member Functions | |
| void | build () |
| Finalize configuration and start processing. | |
| void | build_for (uint64_t milliseconds) |
| Finalize configuration and start processing for a bounded duration. | |
| CaptureBuilder & | capture () |
| Access the capture operation builder for fluent configuration. | |
| std::shared_ptr< Buffers::AudioBuffer > | get_buffer () const |
| Get the internal AudioBuffer for direct manipulation. | |
| std::shared_ptr< Kakshya::DynamicSoundStream > | get_stream () const |
| Get the underlying DynamicSoundStream. | |
| Kakshya::StreamSlice & | load (size_t index, Kakshya::StreamSlice slice) |
| Load a StreamSlice into a voice slot for later playback. | |
| SamplingPipeline & | operator= (const SamplingPipeline &)=delete |
| BufferPipeline & | pipeline () |
| Access the internal pipeline for fluent configuration. | |
| void | play (size_t index, Kakshya::StreamSlice slice) |
| Load a slice into a voice slot and activate it immediately. | |
| void | play (size_t index=0) |
| Activate a voice, resetting its cursor to loop_start. | |
| void | play_continuous (size_t index, Kakshya::StreamSlice slice) |
| Load a slice into a voice slot and activate it with looping enabled. | |
| void | play_continuous (size_t index=0) |
| Activate a voice with looping enabled. | |
| void | rebuild_for (uint64_t milliseconds) |
| Stop and restart pipeline execution for a bounded duration. | |
| SamplingPipeline (const SamplingPipeline &)=delete | |
| 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. | |
| Kakshya::StreamSlice & | slice (size_t index) |
| Direct access to a voice's StreamSlice for configuration. | |
| Kakshya::StreamSlice | slice_from_range (uint64_t start_frame, uint64_t end_frame, uint8_t index=0) const |
| Construct a slice spanning a frame sub-region. | |
| Kakshya::StreamSlice | slice_from_stream (uint8_t index=0) const |
| Construct a slice spanning the full stream. | |
| void | stop (size_t index=0) |
| Deactivate a voice. | |
| ~SamplingPipeline () | |
Private Member Functions | |
| bool | any_active () const |
Private Attributes | |
| uint32_t | m_buf_size |
| std::shared_ptr< Buffers::AudioBuffer > | m_buffer |
| bool | m_built { false } |
| CaptureBuilder | m_capture |
| uint32_t | m_channel |
| Buffers::BufferManager & | m_mgr |
| std::shared_ptr< BufferPipeline > | m_pipeline |
| std::shared_ptr< Buffers::StreamSliceProcessor > | m_processor |
| Vruta::TaskScheduler & | m_scheduler |
| std::shared_ptr< Kakshya::DynamicSoundStream > | m_stream |
Pipeline-coordinated polyphonic playback of a bounded audio stream.
Owns a private AudioBuffer with a StreamSliceProcessor as its default processor. The buffer is supplied to an output channel via BufferManager. A BufferPipeline captures from the buffer at buffer rate with ON_CAPTURE processing, driving process_default() each cycle. The root buffer's ChannelProcessor mixes the result into output.
Voices are activated and deactivated via play() and stop(), which delegate to StreamSliceProcessor::bind/unbind. The pipeline runs for the lifetime of the SamplingPipeline. Inactive voices contribute silence with no read overhead. One-shot voices self-deactivate via the processor's on_end callback.
The pipeline and capture operation are exposed for further chaining: lifecycle callbacks, branching, data-ready hooks, and strategy selection are available through the standard BufferPipeline and CaptureBuilder fluent interfaces before calling build().
Definition at line 42 of file SamplingPipeline.hpp.