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

◆ on_attach()

void MayaFlux::Buffers::FinalLimiterProcessor::on_attach ( const std::shared_ptr< Buffer > &  buffer)
overridevirtual

Called when processor is attached to a buffer.

Parameters
bufferBuffer being attached to

Validates that the buffer is an AudioBuffer-derived type and ensures token compatibility for proper audio processing.

Reimplemented from MayaFlux::Buffers::BufferProcessor.

Definition at line 149 of file RootAudioBuffer.cpp.

150{
151 auto audio_buffer = std::dynamic_pointer_cast<AudioBuffer>(buffer);
152 if (!audio_buffer) {
153 error<std::runtime_error>(Journal::Component::Buffers, Journal::Context::BufferProcessing, std::source_location::current(),
154 "FinalLimiterProcessor can only be attached to AudioBuffer-derived types");
155 }
156
158 error<std::runtime_error>(Journal::Component::Buffers, Journal::Context::BufferProcessing, std::source_location::current(),
159 "FinalLimiterProcessor token incompatible with audio processing requirements");
160 }
161}
bool are_tokens_compatible(ProcessingToken preferred, ProcessingToken current)
Determines if two processing tokens are compatible for joint execution.
@ AUDIO_BACKEND
Standard audio processing backend configuration.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Buffers::are_tokens_compatible(), MayaFlux::Buffers::AUDIO_BACKEND, MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, and MayaFlux::Buffers::BufferProcessor::m_processing_token.

+ Here is the call graph for this function: