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

308{
309 auto buffer = std::make_shared<BufferType>(channel, buffer_size, std::forward<Args>(args)...);
310 register_audio_buffer(buffer, channel);
311 return buffer;
312}
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:215

References register_audio_buffer().

+ Here is the call graph for this function: