arduino-audio-tools
|
Shared functionality of all buffers. More...
#include <Buffers.h>
Public Member Functions | |
BaseBuffer (BaseBuffer const &)=delete | |
virtual T * | address ()=0 |
returns the address of the start of the physical read buffer | |
virtual int | available ()=0 |
provides the number of entries that are available to read | |
virtual int | availableForWrite ()=0 |
provides the number of entries that are available to write | |
void | clear () |
same as reset | |
virtual int | clearArray (int len) |
Removes the next len entries. | |
bool | isEmpty () |
virtual bool | isFull ()=0 |
checks if the buffer is full | |
virtual float | levelPercent () |
Returns the level of the buffer in %. | |
virtual T | peek ()=0 |
peeks the actual entry from the buffer | |
virtual T | read ()=0 |
reads a single value | |
virtual int | readArray (T data[], int len) |
reads multiple values | |
int | readFrames (T data[][2], int len) |
reads multiple values for array of 2 dimensional frames | |
template<int rows, int channels> | |
int | readFrames (T(&data)[rows][channels]) |
virtual void | reset ()=0 |
clears the buffer | |
virtual size_t | size ()=0 |
virtual bool | write (T data)=0 |
write add an entry to the buffer | |
virtual int | writeArray (const T data[], int len) |
Fills the buffer data. | |
virtual int | writeArrayOverwrite (const T data[], int len) |
Fills the buffer data and overwrites the oldest data if the buffer is full. | |
Protected Member Functions | |
void | setWritePos (int pos) |
Protected Attributes | |
friend | NBuffer< T > |
Shared functionality of all buffers.