|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Adapter for bridging N-dimensional containers and AudioBuffer interface. More...
#include <SoundContainerBuffer.hpp>
Inheritance diagram for MayaFlux::Buffers::SoundStreamReader:
Collaboration diagram for MayaFlux::Buffers::SoundStreamReader:Public Member Functions | |
| bool | get_auto_advance () const |
| std::shared_ptr< Kakshya::StreamContainer > | get_container () const |
| uint32_t | get_source_channel () const |
| bool | get_update_flags () const |
| void | on_attach (const std::shared_ptr< Buffer > &buffer) override |
| Attach the adapter to an AudioBuffer. | |
| void | on_detach (const std::shared_ptr< Buffer > &buffer) override |
| Detach the adapter from its AudioBuffer. | |
| void | processing_function (const std::shared_ptr< Buffer > &buffer) override |
| Extracts and processes data from the container into the target AudioBuffer. | |
| void | set_auto_advance (bool enable) |
| Enable or disable automatic advancement of the container's read position. | |
| void | set_container (const std::shared_ptr< Kakshya::StreamContainer > &container) |
| Set the container to adapt. | |
| void | set_source_channel (uint32_t channel_index) |
| Set which channel dimension to extract from the container. | |
| void | set_update_flags (bool update) |
| Enable or disable buffer state flag updates. | |
| SoundStreamReader (const std::shared_ptr< Kakshya::StreamContainer > &container) | |
Public Member Functions inherited from MayaFlux::Buffers::BufferProcessor | |
| virtual ProcessingToken | get_processing_token () const |
| Gets the current processing token for this buffer. | |
| virtual bool | is_compatible_with (const std::shared_ptr< Buffer > &) const |
| Checks if this processor can handle the specified buffer type. | |
| void | process (const std::shared_ptr< Buffer > &buffer) |
| Applies a computational transformation to the data in the provided buffer. | |
| virtual void | set_processing_token (ProcessingToken token) |
| Gets the preferred processing backend for this processor. | |
| virtual | ~BufferProcessor ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Private Member Functions | |
| void | analyze_container_dimensions () |
| Analyze the container's dimensions and update mapping info. | |
| void | extract_channel_data (std::span< double > output) |
| Extract channel data from the container into the output buffer. | |
| void | on_container_state_change (const std::shared_ptr< Kakshya::SignalSourceContainer > &container, Kakshya::ProcessingState state) |
| Respond to container state changes (e.g., READY, PROCESSED, NEEDS_REMOVAL). | |
Private Attributes | |
| bool | m_auto_advance = true |
| uint32_t | m_channel_reader_id = UINT32_MAX |
| uint64_t | m_consumption_offset {} |
| std::shared_ptr< Kakshya::StreamContainer > | m_container |
| uint32_t | m_num_channels { 1 } |
| uint32_t | m_reader_id {} |
| uint32_t | m_source_channel {} |
| std::vector< double > | m_temp_buffer |
| uint32_t | m_time_reader_id = UINT32_MAX |
| bool | m_update_flags = true |
Additional Inherited Members | |
Protected Attributes inherited from MayaFlux::Buffers::BufferProcessor | |
| ProcessingToken | m_processing_token { ProcessingToken::AUDIO_BACKEND } |
Adapter for bridging N-dimensional containers and AudioBuffer interface.
SoundStreamReader enables seamless integration between N-dimensional data containers (such as Kakshya::StreamContainer or SoundFileContainer) and the AudioBuffer processing system. It extracts audio data from containers and presents it as a standard AudioBuffer for use in block-based DSP, node networks, and hardware output.
Key responsibilities:
This adapter is foundational for digital-first workflows where data may originate from files, streams, or procedural sources, and must be routed into the buffer system for further processing or output. While currently focused on audio, the design can be extended to support other data container types as more reader processors are implemented.
Definition at line 32 of file SoundContainerBuffer.hpp.