BTrack - A Real-Time Beat Tracker
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CircularBuffer Class Reference

#include <CircularBuffer.h>

Public Member Functions

 CircularBuffer ()
 
double & operator[] (int i)
 
void addSampleToEnd (double v)
 
void resize (int size)
 
int size ()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CircularBuffer()

CircularBuffer::CircularBuffer ( )
inline

Constructor

Member Function Documentation

◆ addSampleToEnd()

void CircularBuffer::addSampleToEnd ( double  v)
inline

Add a new sample to the end of the buffer

◆ operator[]()

double & CircularBuffer::operator[] ( int  i)
inline

Access the ith element in the buffer

◆ resize()

void CircularBuffer::resize ( int  size)
inline

Resize the buffer

◆ size()

int CircularBuffer::size ( )
inline

Returns the size of the buffer


The documentation for this class was generated from the following file: