MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kakshya::AudioOutputAccessProcessor Class Reference

Default DataProcessor for AudioOutputContainer. More...

#include <AudioOutputAccessProcessor.hpp>

+ Inheritance diagram for MayaFlux::Kakshya::AudioOutputAccessProcessor:
+ Collaboration diagram for MayaFlux::Kakshya::AudioOutputAccessProcessor:

Public Member Functions

 AudioOutputAccessProcessor (uint32_t buffer_size)
 Construct with the fixed output block size.
 
bool is_processing () const override
 Checks if the processor is currently performing processing.
 
void on_attach (const std::shared_ptr< SignalSourceContainer > &container) override
 Validate container type, cache structure, mark ready for processing.
 
void on_detach (const std::shared_ptr< SignalSourceContainer > &container) override
 Clear cached state.
 
void process (const std::shared_ptr< SignalSourceContainer > &container) override
 Pull engine snapshot, write m_processed_data, append to m_data.
 
 ~AudioOutputAccessProcessor () override=default
 
- Public Member Functions inherited from MayaFlux::Kakshya::DataProcessor
virtual ~DataProcessor ()=default
 Virtual destructor for proper cleanup.
 

Private Attributes

Registry::Service::AudioBackendServicem_backend_service { nullptr }
 
uint32_t m_buffer_size { 0 }
 
uint32_t m_channel_count { 0 }
 
std::atomic< bool > m_is_processing { false }
 
OrganizationStrategy m_organization { OrganizationStrategy::PLANAR }
 

Detailed Description

Default DataProcessor for AudioOutputContainer.

Each process() call performs two writes:

  1. m_processed_data — deinterleaved snapshot for the current cycle only. PLANAR: processed_data[ch] = vector<double>(buffer_size) INTERLEAVED: processed_data[0] = vector<double>(buffer_size * channels)
  2. m_data (history) — the same deinterleaved per-channel data is appended to the container's growing corpus via write_frames(). The write head (get_num_frames()) advances by buffer_size each cycle, enabling CursorAccessProcessor readers to chase it independently.

The snapshot pointer from AudioBackendService::get_output_snapshot is engine-owned and valid only for the duration of process(). Both writes complete before process() returns.

on_attach validates that the container is an AudioOutputContainer and caches channel count, buffer size, and organization strategy.

Definition at line 34 of file AudioOutputAccessProcessor.hpp.


The documentation for this class was generated from the following files: