41 void processing_function(std::shared_ptr<Buffer> buffer)
override;
48 void on_attach(std::shared_ptr<Buffer> buffer)
override;
55 void on_detach(std::shared_ptr<Buffer> buffer)
override;
61 void set_source_channel(uint32_t channel_index);
68 void set_container(std::shared_ptr<Kakshya::StreamContainer> container);
69 std::shared_ptr<Kakshya::StreamContainer>
get_container()
const {
return m_container; }
89 uint32_t m_source_channel {};
90 bool m_auto_advance =
true;
91 bool m_update_flags =
true;
93 uint32_t m_time_reader_id = UINT32_MAX;
94 uint32_t m_channel_reader_id = UINT32_MAX;
96 uint32_t m_num_channels { 1 };
97 uint32_t m_reader_id {};
99 uint64_t m_consumption_offset {};
113 void extract_channel_data(std::span<double> output);
121 void on_container_state_change(std::shared_ptr<Kakshya::SignalSourceContainer> container,
156 uint32_t num_samples,
157 std::shared_ptr<Kakshya::StreamContainer> container,
158 uint32_t source_channel = 0);
169 std::shared_ptr<Kakshya::StreamContainer>
get_container()
const {
return m_container; }
180 void set_container(std::shared_ptr<Kakshya::StreamContainer> container);
193 std::shared_ptr<BufferProcessor> create_default_processor()
override;
199 bool m_zero_copy_mode =
false;
204 void setup_zero_copy_if_possible();
Concrete audio implementation of the Buffer interface for double-precision audio data.
Central computational transformation interface for continuous buffer processing.
std::shared_ptr< Kakshya::StreamContainer > m_container
bool is_zero_copy() const
Check if buffer data is directly mapped to container (zero-copy).
uint32_t get_source_channel() const
Get the source channel in the container.
std::shared_ptr< Kakshya::StreamContainer > get_container() const
Get the backing StreamContainer.
uint32_t m_source_channel
std::shared_ptr< BufferProcessor > m_pending_adapter
AudioBuffer implementation backed by a StreamContainer.
bool get_update_flags() const
bool get_auto_advance() const
std::shared_ptr< Kakshya::StreamContainer > get_container() const
uint32_t get_source_channel() const
void analyze_container_dimensions()
Analyze the container's dimensions and update mapping info.
void set_auto_advance(bool enable)
Enable or disable automatic advancement of the container's read position.
void set_update_flags(bool update)
Enable or disable buffer state flag updates.
std::vector< double > m_temp_buffer
std::shared_ptr< Kakshya::StreamContainer > m_container
Adapter for bridging N-dimensional containers and AudioBuffer interface.
ProcessingState
Represents the current processing lifecycle state of a container.