MayaFlux 1.0.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 394 of file Graph.hpp.

395{
396 auto processor = std::make_shared<ProcessorType>(std::forward<Args>(args)...);
397 add_processor(processor, buffer);
398 return processor;
399}
std::shared_ptr< NetworkGeometryBuffer > buffer
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:153

References add_processor(), and buffer.

+ Here is the call graph for this function: