Wrapper class that can turn any Buffer into a thread save implementation.
More...
#include <SynchronizedBuffers.h>
|
| SynchronizedBuffer (BaseBuffer< T > &buffer, Mutex &mutex, bool syncAvailable=false) |
|
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 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]) |
|
void | reset () override |
| clears the buffer
|
|
size_t | size () |
|
bool | write (T data) override |
| write add an entry to the buffer
|
|
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.
|
|
|
void | setWritePos (int pos) |
|
|
bool | is_sync_available = false |
|
friend | NBuffer< T > |
|
BaseBuffer< T > * | p_buffer = nullptr |
|
Mutex * | p_mutex = nullptr |
|
template<typename T>
class audio_tools::SynchronizedBuffer< T >
Wrapper class that can turn any Buffer into a thread save implementation.
- Author
- Phil Schatzmann
- Copyright
- GPLv3 *
- Template Parameters
-
The documentation for this class was generated from the following file: