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

◆ trim()

void MayaFlux::Kinesis::Discrete::Resampler::Impl::trim ( )
inline

Definition at line 187 of file Resample.cpp.

188 {
189 const uint64_t newest = newest_for(emitted);
190 const uint64_t keep_from = newest + 1 > max_taps ? newest + 1 - max_taps : 0;
191 if (keep_from <= origin) {
192 return;
193 }
194 const uint64_t drop = std::min<uint64_t>(keep_from - origin, history.size());
195 history.erase(history.begin(), history.begin() + static_cast<std::ptrdiff_t>(drop));
196 origin += drop;
197 }
uint64_t newest_for(uint64_t k) const noexcept
Definition Resample.cpp:168

References emitted, history, max_taps, newest_for(), and origin.

Here is the call graph for this function: