arduino-audio-tools
|
Public Member Functions | |
NBufferFile (int fileSize) | |
Provide the file size in objects! | |
~NBufferFile () | |
RAII close the files. | |
bool | addFile (File &file) |
T * | address () |
not supported | |
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. | |
void | end () |
clean up files | |
bool | isEmpty () |
virtual bool | isFull () |
checks if the buffer is full | |
virtual float | levelPercent () |
Returns the level of the buffer in %. | |
const char * | nextFileName () |
Determines the next unique file name (after calling addFile) | |
bool | peek (T &data) override |
peeks the actual entry from the buffer | |
bool | read (T &result) override |
reads a single value | |
int | readArray (T data[], int len) override |
reads multiple values | |
void | reset () |
clears the buffer | |
virtual bool | resize (int bytes) |
Resizes the buffer if supported: returns false if not supported. | |
void | setFileDeleteCallback (void(*cb)(const char *filename)) |
Define the file delete operation. | |
size_t | size () override |
bool | write (T sample) override |
write add an entry to the buffer | |
int | writeArray (const T data[], int len) override |
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 | cleanupFile (File &file) |
Protected Attributes | |
File | empty |
Queue< File > | empty_files |
int | file_count = 0 |
void(* | file_delete_callback )(const char *filename) |
Queue< File > | filled_files |
const uint16_t | max_file_name = 256 |
Str | next_file_name |
int | number_of_objects_per_file = 0 |
File | read_file |
File | write_file |
add a buffer file, opened in Write mode. If it already contains any content it will be overwritten
|
inlinevirtual |
not supported
Implements BaseBuffer< T >.
|
inlineoverridevirtual |
provides the number of entries that are available to read
Implements BaseBuffer< T >.
|
inlineoverridevirtual |
provides the number of entries that are available to write
Implements BaseBuffer< T >.
|
inlinevirtualinherited |
Removes the next len entries.
Reimplemented in SingleBuffer< T >, SingleBuffer< int16_t >, SingleBuffer< stsz_sample_size_t >, SingleBuffer< uint32_t >, and SingleBuffer< uint8_t >.
|
inlinevirtualinherited |
checks if the buffer is full
Reimplemented in VariableSpeedRingBufferSimple< T >, VariableSpeedRingBuffer180< T >, VariableSpeedRingBuffer< T >, VariableSpeedRingBuffer< int16_t >, NBuffer< T >, NBuffer< Frame >, NBuffer< uint8_t >, BufferRP2040T< T >, BufferRTOS< T >, BufferRTOS< uint8_t >, SynchronizedBuffer< T >, SingleBuffer< T >, SingleBuffer< int16_t >, SingleBuffer< stsz_sample_size_t >, SingleBuffer< uint32_t >, SingleBuffer< uint8_t >, RingBuffer< T >, RingBuffer< int16_t >, RingBuffer< Sample >, RingBuffer< uint16_t >, RingBuffer< uint8_t >, RingBufferFile< File, T >, and DynamicMultiBuffer< T, BufferType >.
|
inlineoverridevirtual |
peeks the actual entry from the buffer
Implements BaseBuffer< T >.
|
inlineoverridevirtual |
reads a single value
Implements BaseBuffer< T >.
|
inlineoverridevirtual |
reads multiple values
Reimplemented from BaseBuffer< T >.
|
inlinevirtual |
clears the buffer
Implements BaseBuffer< T >.
|
inlinevirtualinherited |
Resizes the buffer if supported: returns false if not supported.
Reimplemented in NBuffer< T >, NBuffer< Frame >, NBuffer< uint8_t >, RingBuffer< T >, RingBuffer< int16_t >, RingBuffer< Sample >, RingBuffer< uint16_t >, RingBuffer< uint8_t >, DynamicMultiBuffer< T, BufferType >, VariableSpeedRingBufferSimple< T >, VariableSpeedRingBuffer180< T >, VariableSpeedRingBuffer< T >, VariableSpeedRingBuffer< int16_t >, SingleBuffer< T >, SingleBuffer< int16_t >, SingleBuffer< stsz_sample_size_t >, SingleBuffer< uint32_t >, SingleBuffer< uint8_t >, RingBufferFile< File, T >, and RedisBuffer< T >.
|
inlineoverridevirtual |
Implements BaseBuffer< T >.
|
inlineoverridevirtual |
write add an entry to the buffer
Implements BaseBuffer< T >.
|
inlineoverridevirtual |
Fills the buffer data.
Reimplemented from BaseBuffer< T >.