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

◆ create_processor() [1/2]

template<typename ProcessorType , typename... Args>
requires std::derived_from<ProcessorType, Buffers::BufferProcessor>
auto MayaFlux::create_processor ( const std::shared_ptr< Buffers::AudioBuffer buffer,
Args &&...  args 
) -> std::shared_ptr<ProcessorType>

Creates a new processor and adds it to a buffer.

Template Parameters
ProcessorTypeType of processor to create (must be derived from BufferProcessor)
ArgsConstructor argument types
Parameters
bufferBuffer to add the processor to
argsConstructor arguments for the processor
Returns
Shared pointer to the created processor

This function creates a new processor of the specified type, initializes it with the provided arguments, and adds it to the specified buffer's processing chain.

Definition at line 293 of file Graph.hpp.

294{
295 auto processor = std::make_shared<ProcessorType>(std::forward<Args>(args)...);
296 add_processor(processor, buffer);
297 return processor;
298}
void add_processor(const std::shared_ptr< Buffers::BufferProcessor > &processor, const std::shared_ptr< Buffers::Buffer > &buffer, Buffers::ProcessingToken token)
Adds a processor to a specific buffer.
Definition Graph.cpp:116

References add_processor().

+ Here is the call graph for this function: