MayaFlux 0.3.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 361 of file Graph.hpp.

362{
363 auto processor = std::make_shared<ProcessorType>(std::forward<Args>(args)...);
364 add_processor(processor, buffer);
365 return processor;
366}
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:138

References add_processor().

+ Here is the call graph for this function: