A NBufferExt is a subclass of NBuffer which allows to use a direct access API to the BaseBuffer.
More...
#include <Buffers.h>
|
|
| NBufferExt (int size, int count) |
| |
| T * | address () |
| | returns the address of the start of the phsical read buffer
|
| |
| int | available () |
| | determines the available entries for the current read buffer
|
| |
| int | availableForWrite () |
| | determines the available entries for the write buffer
|
| |
| virtual int | bufferCountEmpty () |
| | Provides the number of entries that are available to write.
|
| |
| virtual int | bufferCountFilled () |
| | Provides the number of entries that are available to read.
|
| |
|
void | clear () |
| | same as reset
|
| |
| virtual int | clearArray (int len) |
| | Removes the next len entries.
|
| |
|
SingleBuffer< T > * | getBuffer (int id) |
| | Provides the buffer with the indicated id.
|
| |
|
bool | isEmpty () |
| |
| bool | isFull () |
| | checks if the buffer is full
|
| |
|
virtual float | levelPercent () |
| | Returns the level of the buffer in %.
|
| |
| bool | peek (T &result) override |
| | peeks the actual entry from the buffer
|
| |
| bool | read (T &result) override |
| | reads an entry from the buffer
|
| |
| virtual int | readArray (T data[], int len) |
| | reads multiple values
|
| |
| SingleBuffer< T > * | readEnd () |
| |
| void | reset () |
| | resets all buffers
|
| |
| virtual bool | resize (int bytes) |
| | Resizes the buffer if supported: returns false if not supported.
|
| |
| virtual bool | resize (int size, int count) |
| | Resize the buffers by defining a new buffer size and buffer count.
|
| |
|
unsigned long | sampleRate () |
| | provides the actual sample rate
|
| |
| size_t | size () |
| | Provides the total capacity (=buffer size * buffer count)
|
| |
| bool | write (T data) |
| | 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.
|
| |
| SingleBuffer< T > * | writeEnd () |
| |
|
|
virtual bool | addAvailableBuffer (BaseBuffer< T > *buffer) |
| |
|
virtual bool | addFilledBuffer (BaseBuffer< T > *buffer) |
| |
|
void | freeMemory () |
| |
|
virtual BaseBuffer< T > * | getNextAvailableBuffer () |
| |
|
virtual BaseBuffer< T > * | getNextFilledBuffer () |
| |
|
void | resetCurrent () |
| |
template<typename T = int16_t>
class audio_tools::NBufferExt< T >
A NBufferExt is a subclass of NBuffer which allows to use a direct access API to the BaseBuffer.
- Template Parameters
-
◆ address()
template<typename T = int16_t>
returns the address of the start of the phsical read buffer
Implements BaseBuffer< T >.
◆ available()
template<typename T = int16_t>
determines the available entries for the current read buffer
Implements BaseBuffer< T >.
◆ availableForWrite()
template<typename T = int16_t>
| int availableForWrite |
( |
| ) |
|
|
inlinevirtualinherited |
determines the available entries for the write buffer
Implements BaseBuffer< T >.
◆ bufferCountEmpty()
template<typename T = int16_t>
| virtual int bufferCountEmpty |
( |
| ) |
|
|
inlinevirtualinherited |
◆ bufferCountFilled()
template<typename T = int16_t>
| virtual int bufferCountFilled |
( |
| ) |
|
|
inlinevirtualinherited |
◆ clearArray()
template<typename T = int16_t>
| virtual int clearArray |
( |
int |
len | ) |
|
|
inlinevirtualinherited |
◆ isFull()
template<typename T = int16_t>
◆ peek()
template<typename T = int16_t>
|
|
inlineoverridevirtualinherited |
◆ read()
template<typename T = int16_t>
|
|
inlineoverridevirtualinherited |
◆ readArray()
template<typename T = int16_t>
| virtual int readArray |
( |
T |
data[], |
|
|
int |
len |
|
) |
| |
|
inlinevirtualinherited |
◆ readEnd()
template<typename T = int16_t>
Alternative interface using address: provides access to the next read buffer
◆ reset()
template<typename T = int16_t>
◆ resize() [1/2]
template<typename T = int16_t>
| virtual bool resize |
( |
int |
bytes | ) |
|
|
inlinevirtualinherited |
Resizes the buffer if supported: returns false if not supported.
Reimplemented from BaseBuffer< T >.
◆ resize() [2/2]
template<typename T = int16_t>
| virtual bool resize |
( |
int |
size, |
|
|
int |
count |
|
) |
| |
|
inlinevirtualinherited |
◆ size()
template<typename T = int16_t>
◆ write()
template<typename T = int16_t>
◆ writeArray()
template<typename T = int16_t>
| virtual int writeArray |
( |
const T |
data[], |
|
|
int |
len |
|
) |
| |
|
inlinevirtualinherited |
Fills the buffer data.
Reimplemented in BufferRTOS< T >, SynchronizedBuffer< T >, RedisBuffer< T >, BufferRP2040T< T >, SingleBuffer< T >, SingleBuffer< T >, RingBufferFile< File, T >, NBufferFile< File, T >, and DynamicMultiBuffer< T, BufferType >.
◆ writeEnd()
template<typename T = int16_t>
Alternative interface: Provides access to the next write buffer
The documentation for this class was generated from the following file: