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

◆ push()

template<typename T >
void MayaFlux::Memory::HistoryBuffer< T >::push ( const T &  value)
inline

Push new value to front of history.

Parameters
valueNew sample value

Inserts value at index 0, shifting all previous values back. Oldest value (at index capacity-1) is discarded.

Definition at line 455 of file RingBuffer.hpp.

456 {
457 if (m_capacity == 0)
458 return;
459
460 m_head = (m_head == 0) ? m_capacity - 1 : m_head - 1;
462
463 if (m_count < m_capacity) {
464 ++m_count;
465 }
466 }
float value

References MayaFlux::Memory::HistoryBuffer< T >::m_capacity, MayaFlux::Memory::HistoryBuffer< T >::m_count, MayaFlux::Memory::HistoryBuffer< T >::m_data, MayaFlux::Memory::HistoryBuffer< T >::m_head, and value.

Referenced by MayaFlux::Nodes::Network::WaveguideNetwork::process_bidirectional(), MayaFlux::Nodes::Generator::Polynomial::process_sample(), MayaFlux::Nodes::Network::WaveguideNetwork::process_unidirectional(), and MayaFlux::Buffers::FeedbackProcessor::processing_function().

+ Here is the caller graph for this function: