TimedFIFO

Reusable mechanism to provide the UI with continuously available non-critical data from the audio thread. eg: for waveforms, analyzers, displays, etc... In the case where the FIFO is empty, it may be that there is nothing to draw or audio processing has stopped. And because audio buffers may be long, we can't just use atomics and avoid updating the UI when the buffer has already been processed. It would cause slowness with small buffers.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

initialize
void initialize(int size, int divider)
pushData
void pushData(T input, float sampleRate)

Same but with 1 element.

readOldestDataAndDropSome
int readOldestDataAndDropSome(T[] output, double dt, int keepAtLeast)

Get some amount of oldest samples in the FIFO The drop some amount of samples that correspond to time passing of dt

Meta