A NBufferExt is a subclass of NBuffer which allows to use a direct access API to the BaseBuffer.
More...
#include <CodecOpusOgg.h>
|
| | NBufferExt (int size, int count) |
| | NBufferExt (int size, int count) |
| uint8_t * | address () |
| | returns the address of the start of the actual physical 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.
|
| void | flush () |
| virtual float | freePercent () |
| | Returns the free space of the buffer in %.
|
| SingleBuffer< T > * | getBuffer (int id) |
| | Provides the buffer with the indicated id.
|
| 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 (uint8_t &result) override |
| | peeks the actual entry from the buffer
|
| virtual bool | peek (uint8_t &result)=0 |
| | peeks the actual entry from the buffer
|
| bool | read (uint8_t &result) override |
| | reads an entry from the buffer
|
| virtual bool | read (uint8_t &result)=0 |
| | reads a single value
|
| virtual int | readArray (uint8_t data[], int len) |
| | reads multiple values
|
| int | readArray (uint8_t data[], int len) override |
| SingleBuffer< T > * | readEnd () |
| SingleBuffer< T > * | readEnd () |
| void | reset () |
| | resets all buffers
|
| virtual bool | resize (size_t bytes) |
| | Resize the buffer to the next multiple of buffer size.
|
| unsigned long | sampleRate () |
| | provides the actual sample rate
|
| size_t | size () |
| | Provides the total capacity (=buffer size * buffer count).
|
| bool | write (uint8_t data) |
| | write add an entry to the buffer
|
| virtual bool | write (uint8_t data)=0 |
| | write add an entry to the buffer
|
| virtual int | writeArray (const uint8_t data[], int len) |
| | Fills the buffer data.
|
| virtual int | writeArrayOverwrite (const uint8_t data[], int len) |
| | Fills the buffer data and overwrites the oldest data if the buffer is full.
|
| SingleBuffer< T > * | writeEnd () |
| SingleBuffer< T > * | writeEnd () |
template<typename T = uint8_t>
class audio_tools::audio_tools::NBufferExt< T >
A NBufferExt is a subclass of NBuffer which allows to use a direct access API to the BaseBuffer.
- Template Parameters
-
◆ NBufferExt() [1/2]
template<typename T = uint8_t>
| NBufferExt |
( |
int | size, |
|
|
int | count ) |
|
inline |
◆ NBufferExt() [2/2]
template<typename T = uint8_t>
| NBufferExt |
( |
int | size, |
|
|
int | count ) |
|
inline |
◆ addAvailableBuffer()
| virtual bool addAvailableBuffer |
( |
BaseBuffer< uint8_t > * | buffer | ) |
|
|
inlineprotectedvirtualinherited |
◆ addFilledBuffer()
| virtual bool addFilledBuffer |
( |
BaseBuffer< uint8_t > * | buffer | ) |
|
|
inlineprotectedvirtualinherited |
◆ address()
◆ available()
◆ availableForWrite()
| int availableForWrite |
( |
| ) |
|
|
inlinevirtualinherited |
◆ bufferCountEmpty()
| virtual int bufferCountEmpty |
( |
| ) |
|
|
inlinevirtualinherited |
◆ bufferCountFilled()
| virtual int bufferCountFilled |
( |
| ) |
|
|
inlinevirtualinherited |
◆ clear()
◆ clearArray()
| virtual int clearArray |
( |
int | len | ) |
|
|
inlinevirtualinherited |
Removes the next len entries.
◆ flush()
Submit the partially-filled write buffer to the filled queue so the reader can access it immediately. Call after writeArray() when the writer won't add more data to the current block for a while.
Reimplemented from BaseBuffer< uint8_t >.
◆ freeMemory()
◆ freePercent()
| virtual float freePercent |
( |
| ) |
|
|
inlinevirtualinherited |
Returns the free space of the buffer in %.
◆ getBuffer() [1/2]
template<typename T = uint8_t>
Provides the buffer with the indicated id.
◆ getBuffer() [2/2]
template<typename T = uint8_t>
Provides the buffer with the indicated id.
◆ getNextAvailableBuffer()
| virtual BaseBuffer< uint8_t > * getNextAvailableBuffer |
( |
| ) |
|
|
inlineprotectedvirtualinherited |
◆ getNextFilledBuffer()
| virtual BaseBuffer< uint8_t > * getNextFilledBuffer |
( |
| ) |
|
|
inlineprotectedvirtualinherited |
◆ isEmpty()
◆ isFull()
◆ levelPercent()
| virtual float levelPercent |
( |
| ) |
|
|
inlinevirtualinherited |
Returns the level of the buffer in %.
◆ peek() [1/2]
| bool peek |
( |
uint8_t & | result | ) |
|
|
inlineoverridevirtualinherited |
◆ peek() [2/2]
| virtual bool peek |
( |
uint8_t & | result | ) |
|
|
pure virtualinherited |
peeks the actual entry from the buffer
◆ read() [1/2]
| bool read |
( |
uint8_t & | result | ) |
|
|
inlineoverridevirtualinherited |
◆ read() [2/2]
| virtual bool read |
( |
uint8_t & | result | ) |
|
|
pure virtualinherited |
◆ readArray() [1/2]
| virtual int readArray |
( |
uint8_t | data[], |
|
|
int | len ) |
|
inlinevirtualinherited |
◆ readArray() [2/2]
| int readArray |
( |
uint8_t | data[], |
|
|
int | len ) |
|
inlineoverridevirtualinherited |
◆ readEnd() [1/2]
template<typename T = uint8_t>
Alternative interface using address: provides access to the next read buffer
◆ readEnd() [2/2]
template<typename T = uint8_t>
Alternative interface using address: provides access to the next read buffer
◆ reset()
◆ resetCurrent()
◆ resize()
| virtual bool resize |
( |
size_t | bytes | ) |
|
|
inlinevirtualinherited |
◆ sampleRate()
| unsigned long sampleRate |
( |
| ) |
|
|
inlineinherited |
provides the actual sample rate
◆ size()
◆ write() [1/2]
| bool write |
( |
uint8_t | data | ) |
|
|
inlinevirtualinherited |
◆ write() [2/2]
| virtual bool write |
( |
uint8_t | data | ) |
|
|
pure virtualinherited |
write add an entry to the buffer
◆ writeArray()
| virtual int writeArray |
( |
const uint8_t | data[], |
|
|
int | len ) |
|
inlinevirtualinherited |
◆ writeArrayOverwrite()
| virtual int writeArrayOverwrite |
( |
const uint8_t | data[], |
|
|
int | len ) |
|
inlinevirtualinherited |
Fills the buffer data and overwrites the oldest data if the buffer is full.
◆ writeEnd() [1/2]
template<typename T = uint8_t>
Alternative interface: Provides access to the next write buffer
◆ writeEnd() [2/2]
template<typename T = uint8_t>
Alternative interface: Provides access to the next write buffer
◆ actual_read_buffer
◆ actual_write_buffer
◆ available_buffers
◆ buffer_count
◆ buffer_size
◆ filled_buffers
◆ sample_count
| unsigned long sample_count |
|
protectedinherited |
◆ start_time
The documentation for this class was generated from the following files: