A File backed buffer which uses the provided files for buffering with the indicated max size. A file is made available for reading as soon as it reached the size limit. You must provide the files opened in "Write" mode with the addFile() method!
More...
|
|
| 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.
|
| |
template<class
File, typename T>
class audio_tools::NBufferFile< File, T >
A File backed buffer which uses the provided files for buffering with the indicated max size. A file is made available for reading as soon as it reached the size limit. You must provide the files opened in "Write" mode with the addFile() method!
- Template Parameters
-
| File | file class |
| T | buffered data type |