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

~this
~this()
Undocumented in source.

Members

Functions

initialize
void initialize(int size, int divider)
pushData
void pushData(T[] input, float sampleRate)
Undocumented in source. Be warned that the author may not have intended to support it.
pushData
void pushData(T input, float sampleRate)

Same but with 1 element.

readIndexAtLastRead
int readIndexAtLastRead()

Getting the last used read index is useful if you want to further filter the TImedFIFO output, and need a modulo reference for to alignment. In Couture, this is used to avoid "humps" on gain display.

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

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

readOldestDataAndDropSome
bool readOldestDataAndDropSome(T* output, double dt)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta