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

◆ clone_to() [2/2]

std::shared_ptr< Buffer > MayaFlux::Buffers::AudioBuffer::clone_to ( uint8_t  dest_desc)
overridevirtual

Creates a clone of this buffer for a specific channel or usage enum.

Parameters
dest_descDestination channel identifier or usage descriptor for the cloned buffer
Returns
Shared pointer to the cloned buffer

This method creates a new instance of the buffer with the same data and properties, but assigned to a different channel. The cloned buffer can be used independently in processing chains.

NOTE: The moment of cloning is the divergence point between the original and the cloned. While they both will follow the same processing chain or have the same default procesor, any changes made to one buffer after cloning will not affect the other.

Implements MayaFlux::Buffers::Buffer.

Definition at line 78 of file AudioBuffer.cpp.

79{
80 auto buf = clone_to(static_cast<uint32_t>(dest_desc));
81 return std::dynamic_pointer_cast<Buffer>(buf);
82}
virtual std::shared_ptr< AudioBuffer > clone_to(uint32_t channel)
Creates a clone of this audio buffer for a specific channel.

References clone_to().

+ Here is the call graph for this function: