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

◆ create_buffer() [2/2]

template<typename BufferType , typename... Args>
requires std::derived_from<BufferType, Buffers::AudioBuffer>
auto MayaFlux::create_buffer ( uint32_t  channel,
uint32_t  buffer_size,
Args &&...  args 
) -> std::shared_ptr<BufferType>

creates a new buffer of the specified type and registers it

Template Parameters
BufferTypeType of buffer to create (must be derived from AudioBuffer)
ArgsConstructor argument types
Parameters
channelChannel index to create the buffer for
buffer_sizeSize of the buffer in processing units

Definition at line 232 of file Graph.hpp.

233{
234 auto buffer = std::make_shared<BufferType>(channel, buffer_size, std::forward<Args>(args)...);
235 register_audio_buffer(buffer, channel);
236 return buffer;
237}
void register_audio_buffer(const std::shared_ptr< Buffers::AudioBuffer > &buffer, uint32_t channel)
Registers an AudioBuffer with the default engine's buffer manager.
Definition Graph.cpp:150

References register_audio_buffer().

+ Here is the call graph for this function: