name: CircularDelayLine<class TObject>

synopsis:

g++ [flags ...] file ...

#include <CircularDelayLine.h>
CircularDelayLine(long length=DEF_LENGTH);
boolean assign(const TObject& input);  
boolean advance(long increment=DEF_INCREMENT);
quick start:

// declare a Float CircularDelayLine of capacity 5
//
CircularDelayLine<Float> cdl(5);
Float tmp;

for (long i = 0; i < 5; i++) {
  tmp = (float)i;
  cdl.assignAndAppend(num);
}
description:

The CircularDelayLine class is a classic circular buffer that is typically used in digital signal processing (DSP) to implement delay lines and linear filters. See: for a nice introduction on the use of circular buffers in DSP.

This class is implemented as a Vector of TObjects and an integer pointer. CircularDelayLine has a current pointer that moves around the vector, and wraps around the ends of the vector. A simple interface is provided that allows data to be easily added to the buffer, and current values of the buffer to be accessed via standard array indexing.

dependencies:

public constants: error codes:

protected data:

required public methods:

class-specific public methods:

private methods: friend classes:

examples:

notes: