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

◆ on_attach()

void MayaFlux::Buffers::ChannelProcessor::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 a compatible RootAudioBuffer and ensures token compatibility for proper processing pipeline integration.

Reimplemented from MayaFlux::Buffers::BufferProcessor.

Definition at line 72 of file RootAudioBuffer.cpp.

73{
74 auto root_audio_buffer = std::dynamic_pointer_cast<RootAudioBuffer>(buffer);
75 if (!root_audio_buffer) {
76 error<std::runtime_error>(Journal::Component::Buffers, Journal::Context::BufferProcessing, std::source_location::current(),
77 "ChannelProcessor can only be attached to RootAudioBuffer");
78 }
79
81 error<std::runtime_error>(Journal::Component::Buffers, Journal::Context::BufferProcessing, std::source_location::current(),
82 "ChannelProcessor token incompatible with RootAudioBuffer requirements");
83 }
84}
std::shared_ptr< NetworkGeometryBuffer > buffer
@ AUDIO_BACKEND
Standard audio processing backend configuration.
bool are_tokens_compatible(ProcessingToken preferred, ProcessingToken current)
Determines if two processing tokens are compatible for joint execution.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

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

+ Here is the call graph for this function: