|
| RingBufferFile (bool autoRewind=true) |
|
| RingBufferFile (File &file, bool autoRewind=true) |
|
T * | address () override |
| returns the address of the start of the physical read buffer
|
|
int | available () override |
| provides the number of entries that are available to read
|
|
int | availableForWrite () override |
| 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 () |
|
bool | isFull () override |
| checks if the buffer is full
|
|
virtual float | levelPercent () |
| Returns the level of the buffer in %.
|
|
T | peek () override |
| peeks the actual entry from the buffer
|
|
T | read () override |
| reads a single value
|
|
int | readArray (T data[], int count) override |
| 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]) |
|
void | reset () override |
| clears the buffer
|
|
void | setAutoRewind (bool flag) |
|
void | setFile (File &bufferFile, bool clear=false) |
| Assigns the p_file to be used.
|
|
size_t | size () override |
|
virtual bool | write (T data) override |
| write add an entry to the buffer
|
|
int | writeArray (const T data[], int len) override |
| Fills the data from the buffer.
|
|
virtual int | writeArrayOverwrite (const T data[], int len) |
| Fills the buffer data and overwrites the oldest data if the buffer is full.
|
|
template<class File, typename T>
class audio_tools::RingBufferFile< File, T >
An File backed Ring Buffer that we can use to receive streaming audio. We expect an open p_file as parameter.
If you want to keep the processed data, call setAutoRewind(false) and call p_file->save() when you are done!
- Template Parameters
-