BTrack - A Real-Time Beat Tracker
|
#include <CircularBuffer.h>
Public Member Functions | |
CircularBuffer () | |
double & | operator[] (int i) |
void | addSampleToEnd (double v) |
void | resize (int size) |
int | size () |
A circular buffer that allows you to add new samples to the end whilst removing them from the beginning. This is implemented in an efficient way which doesn't involve any memory allocation as samples are added to the end of the buffer
|
inline |
Constructor
|
inline |
Add a new sample to the end of the buffer
|
inline |
Access the ith element in the buffer
|
inline |
Resize the buffer
|
inline |
Returns the size of the buffer