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

◆ clone_to()

virtual std::shared_ptr< Buffer > MayaFlux::Buffers::Buffer::clone_to ( uint8_t  dest_desc)
pure virtual

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.

Implemented in MayaFlux::Buffers::AudioBuffer, and MayaFlux::Buffers::VKBuffer.