MayaFlux 0.1.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 286 of file Graph.hpp.

287{
288 auto processor = std::make_shared<ProcessorType>(std::forward<Args>(args)...);
289 add_processor(processor, buffer);
290 return processor;
291}
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:86

References add_processor().

+ Here is the call graph for this function: