MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ processing_function()

void MayaFlux::Buffers::AudioComputeProcessor::processing_function ( const std::shared_ptr< Buffer > & buffer)
overridevirtual

The core processing function that must be implemented by derived classes.

Parameters
bufferBuffer to process

This method is where the actual transformation logic is implemented. It should contain the algorithmic details of how the buffer's data is transformed, analyzed, or processed. The implementation can utilize any backend capabilities available to the processor, including:

  • Parallel Processing: Using multi-threading or GPU compute for large datasets
  • Data Transformations: Applying mathematical operations, filters, or effects
  • Feature Extraction: Analyzing data characteristics for further processing

Derived classes must override this method to provide specific processing behavior.

Implements MayaFlux::Buffers::BufferProcessor.

Definition at line 175 of file AudioComputeProcessor.cpp.

176{
177 m_in_flight.store(true, std::memory_order_seq_cst);
178 process_block(buffer);
179 m_in_flight.store(false, std::memory_order_seq_cst);
180
181 if (!m_attached.load(std::memory_order_seq_cst)) {
182 release(buffer);
183 }
184}
std::atomic< bool > m_attached
Set on attach, cleared on detach.
void process_block(const std::shared_ptr< Buffer > &buffer)
void release(const std::shared_ptr< Buffer > &buffer)
std::atomic< bool > m_in_flight
Set while processing_function runs on the processing thread.

References m_attached, m_in_flight, process_block(), and release().

Here is the call graph for this function: