|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Top-level aggregation buffer for computational data streams. More...
#include <RootAudioBuffer.hpp>
Inheritance diagram for MayaFlux::Buffers::RootAudioBuffer:
Collaboration diagram for MayaFlux::Buffers::RootAudioBuffer:Public Member Functions | |
| const std::vector< double > & | get_node_output () const |
| Gets the current node network output data. | |
| bool | has_node_output () const |
| Checks if this buffer has node network output data. | |
| void | initialize () |
| bool | is_token_active () const override |
| Checks if the buffer is active for its assigned token. | |
| void | process_default () override |
| Processes this buffer using its default aggregation processor. | |
| void | resize (uint32_t num_samples) override |
| Resizes this buffer and all tributary buffers. | |
| RootAudioBuffer (uint32_t channel_id, uint32_t num_samples=512) | |
| Creates a new root aggregation buffer for a channel. | |
| void | set_node_output (const std::vector< double > &data) |
| Sets direct node network output data for this buffer. | |
| void | set_token_active (bool active) override |
| Activates/deactivates processing for the current token. | |
| ~RootAudioBuffer () override=default | |
| Virtual destructor for proper resource management. | |
Public Member Functions inherited from MayaFlux::Buffers::RootBuffer< AudioBuffer > | |
| virtual void | add_child_buffer (const std::shared_ptr< AudioBuffer > &buffer) |
| Adds a tributary buffer to this root buffer. | |
| void | clear () override |
| Resets all data values in this buffer and its tributaries. | |
| virtual void | enable_cross_modal_sharing (bool enabled) |
| Enables cross-modal data sharing. | |
| const std::vector< std::shared_ptr< AudioBuffer > > & | get_child_buffers () const |
| Gets all tributary buffers in the aggregation hierarchy. | |
| size_t | get_num_children () const |
| Gets the number of tributary buffers in the aggregation hierarchy. | |
| virtual uint32_t | get_processing_rate_hint () const |
| Gets the processing rate hint. | |
| bool | has_pending_operations () const |
| bool | is_buffer_acceptable (const std::shared_ptr< AudioBuffer > &buffer, std::string *rejection_reason=nullptr) const |
| Validates if a buffer is acceptable based on current token enforcement strategy. | |
| virtual bool | is_cross_modal_sharing_enabled () const |
| Checks if cross-modal sharing is enabled. | |
| virtual void | remove_child_buffer (const std::shared_ptr< AudioBuffer > &buffer) |
| Removes a tributary buffer from this root buffer. | |
| virtual void | set_processing_rate_hint (uint32_t tick_rate) |
| Sets processing rate hint for the buffer. | |
| virtual bool | try_add_child_buffer (const std::shared_ptr< AudioBuffer > &buffer, std::string *rejection_reason=nullptr) |
| Attempts to add a child buffer without throwing exceptions. | |
Public Member Functions inherited from MayaFlux::Buffers::AudioBuffer | |
| AudioBuffer () | |
| Creates a new uninitialized audio buffer. | |
| AudioBuffer (uint32_t channel_id, uint32_t num_samples=512) | |
| Creates a new audio buffer with specified channel and capacity. | |
| virtual std::shared_ptr< AudioBuffer > | clone_to (uint32_t channel) |
| Creates a clone of this audio buffer for a specific channel. | |
| std::shared_ptr< Buffer > | clone_to (uint8_t dest_desc) override |
| Creates a clone of this buffer for a specific channel or usage enum. | |
| void | enforce_default_processing (bool should_process) override |
| Controls whether the audio buffer should use default processing. | |
| void | force_internal_usage (bool internal) override |
| Marks the buffer as internal-only, preventing root aggregation. | |
| virtual uint32_t | get_channel_id () const |
| Gets the audio channel identifier for this buffer. | |
| virtual std::vector< double > & | get_data () |
| Gets mutable access to the buffer's underlying audio data. | |
| virtual const std::vector< double > & | get_data () const |
| Gets read-only access to the buffer's underlying audio data. | |
| std::shared_ptr< BufferProcessor > | get_default_processor () const override |
| Gets the current default audio transformation processor. | |
| virtual uint32_t | get_num_samples () const |
| Gets the current capacity of the audio buffer. | |
| std::shared_ptr< BufferProcessingChain > | get_processing_chain () override |
| Gets the audio transformation chain attached to this buffer. | |
| BufferRoutingState & | get_routing_state () |
| Retrieves the current routing state of the buffer (non-const) | |
| const BufferRoutingState & | get_routing_state () const |
| Retrieves the current routing state of the buffer. | |
| virtual double & | get_sample (uint32_t index) |
| Gets a reference to a specific audio sample in the buffer. | |
| bool | has_data_for_cycle () const override |
| Checks if the audio buffer has data for the current processing cycle. | |
| bool | is_internal_only () const override |
| Checks if the buffer is marked as internal-only. | |
| bool | is_processing () const override |
| Checks if the buffer is currently being processed. | |
| void | mark_for_processing (bool has_data) override |
| Marks the audio buffer for processing in the current cycle. | |
| void | mark_for_removal () override |
| Marks the audio buffer for removal from processing chains. | |
| bool | needs_default_processing () override |
| Checks if the audio buffer should undergo default processing. | |
| bool | needs_removal () const override |
| Checks if the buffer should be removed from the processing chain This is relevant when using SignalSourceContainers. | |
| bool | needs_routing () const |
| Checks if the buffer is currently in a routing transition phase. | |
| virtual bool | read_once (const std::shared_ptr< AudioBuffer > &buffer, bool force=false) |
| Reads audio data into the buffer from the audio backend. | |
| void | release_processing () override |
| Releases processing rights for the buffer. | |
| void | set_channel_id (uint32_t id) |
| Sets the audio channel identifier for this buffer. | |
| void | set_default_processor (const std::shared_ptr< BufferProcessor > &processor) override |
| Sets the default audio transformation processor for this buffer. | |
| virtual void | set_num_samples (uint32_t num_samples) |
| Sets the capacity of the audio buffer. | |
| void | set_processing_chain (const std::shared_ptr< BufferProcessingChain > &chain, bool force=false) override |
| Sets the audio transformation chain for this buffer. | |
| virtual void | setup (uint32_t channel, uint32_t num_samples) |
| Initializes the audio buffer with specified channel and capacity. | |
| virtual void | setup_processors (ProcessingToken token) |
| Sets up audio processors for the specified processing token. | |
| bool | try_acquire_processing () override |
| Attempts to acquire processing rights for the buffer. | |
| ~AudioBuffer () override=default | |
| Virtual destructor for proper resource management. | |
Public Member Functions inherited from MayaFlux::Buffers::Buffer | |
| virtual | ~Buffer ()=default |
| Virtual destructor for proper resource management. | |
Protected Member Functions | |
| std::shared_ptr< BufferProcessor > | create_default_processor () override |
| Creates the default processor for this buffer type. | |
Protected Member Functions inherited from MayaFlux::Buffers::RootBuffer< AudioBuffer > | |
| void | add_child_buffer_direct (const std::shared_ptr< AudioBuffer > &buffer) |
| void | process_pending_buffer_operations () |
| Process pending operations - call this at start of processing cycles. | |
| void | remove_child_buffer_direct (const std::shared_ptr< AudioBuffer > &buffer) |
Private Attributes | |
| bool | m_has_node_output |
| Flag indicating if node network output data is present. | |
| std::vector< double > | m_node_output |
| Data received directly from computational node networks. | |
| bool | m_token_active |
| Flag indicating if this buffer is active for token processing. | |
Additional Inherited Members | |
Protected Attributes inherited from MayaFlux::Buffers::RootBuffer< AudioBuffer > | |
| std::vector< std::shared_ptr< AudioBuffer > > | m_child_buffers |
| Vector of tributary buffers that contribute to this root buffer. | |
| bool | m_cross_modal_sharing |
| Whether this buffer allows cross-modal data sharing. | |
| std::atomic< uint32_t > | m_pending_count |
| struct MayaFlux::Buffers::RootBuffer::PendingBufferOp | m_pending_ops [MAX_PENDING] |
| ProcessingToken | m_preferred_processing_token |
| Preferred processing token for this root buffer. | |
| uint32_t | m_processing_rate_hint |
| Processing rate hint for this buffer. | |
| TokenEnforcementStrategy | m_token_enforcement_strategy |
| Current token enforcement strategy for this root buffer. | |
Protected Attributes inherited from MayaFlux::Buffers::AudioBuffer | |
| uint32_t | m_channel_id |
| Audio channel identifier for this buffer. | |
| std::vector< double > | m_data |
| Vector storing the actual double-precision audio sample data. | |
| std::shared_ptr< BufferProcessor > | m_default_processor |
| Default audio transformation processor for this buffer. | |
| bool | m_has_data |
| Whether the audio buffer has data to process this cycle. | |
| uint32_t | m_num_samples |
| Capacity of the buffer in audio samples. | |
| bool | m_process_default |
| Whether the audio buffer should be processed using its default processor. | |
| std::shared_ptr< BufferProcessingChain > | m_processing_chain |
| Audio transformation processing chain for this buffer. | |
| BufferRoutingState | m_routing_state |
| Internal state tracking for routing transitions. | |
| bool | m_should_remove |
| Whether the audio buffer should be removed from processing chains. | |
Static Protected Attributes inherited from MayaFlux::Buffers::RootBuffer< AudioBuffer > | |
| static constexpr size_t | MAX_PENDING |
Top-level aggregation buffer for computational data streams.
RootAudioBuffer serves as the final convergence point for data streams in each channel before output to hardware interfaces. Similar to RootNode in the node system, there is typically one RootAudioBuffer per output channel in a multi-channel system.
Key responsibilities:
RootAudioBuffer implements a hierarchical data aggregation pattern where multiple computational streams (child buffers and node output) are combined through a configurable mixing algorithm before being transmitted to hardware interfaces.
Definition at line 28 of file RootAudioBuffer.hpp.