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

◆ clone_to() [2/3]

std::shared_ptr< AudioBuffer > MayaFlux::Buffers::FeedbackBuffer::clone_to ( uint32_t  channel)
overridevirtual

Clone for another channel with its own ring and its own processor state.

Reimplemented from MayaFlux::Buffers::AudioBuffer.

Definition at line 51 of file FeedbackBuffer.cpp.

52{
53 auto clone = std::make_shared<FeedbackBuffer>(channel, get_num_samples(), m_feedback_amount, m_feed_samples);
54 clone->get_data() = get_data();
55
56 if (auto proc = std::dynamic_pointer_cast<FeedbackProcessor>(m_default_processor)) {
57 clone->set_default_processor(proc->clone());
58 }
59
60 clone->set_processing_chain(get_processing_chain(), true);
61 return clone;
62}
virtual std::vector< double > & get_data()
Gets mutable access to the buffer's underlying audio data.
virtual uint32_t get_num_samples() const
Gets the current capacity of the audio buffer.
std::shared_ptr< BufferProcessor > m_default_processor
Default audio transformation processor for this buffer.
std::shared_ptr< BufferProcessingChain > get_processing_chain() override
Gets the audio transformation chain attached to this buffer.

References MayaFlux::Buffers::AudioBuffer::get_data(), MayaFlux::Buffers::AudioBuffer::get_num_samples(), MayaFlux::Buffers::AudioBuffer::get_processing_chain(), MayaFlux::Buffers::AudioBuffer::m_default_processor, m_feed_samples, and m_feedback_amount.

+ Here is the call graph for this function: