|
arduino-audio-tools
|
ConverterStream Helper class which implements the readBytes with the help of write. More...
#include <AudioIO.h>
Public Member Functions | |
| int | available () |
| void | begin (T *transform, Stream *source) |
| setup of the TransformationReader class | |
| void | end () |
| size_t | getTotalBytesRead () const |
| size_t | readBytes (uint8_t *data, size_t len) |
| void | resizeResultQueue (int size) |
| Defines the queue size for result. | |
| void | setEofOnZeroReads (bool flag) |
| void | setMaxReadSize (int size) |
| void | setResultQueueFactor (int factor) |
| Defines the queue size dependent on the read size. | |
Protected Member Functions | |
| void | fillResultQueue (size_t len) |
| void | resizeReadBuffer (int size) |
| Defines the read buffer size for individual reads. | |
| void | restoreOutput (Print *out) |
| restores the original output in the converter class | |
| void | setupBuffers (size_t len) |
| Print * | setupOutput () |
Protected Attributes | |
| bool | active = false |
| Vector< uint8_t > | buffer {0} |
| bool | eof_on_zero_reads = true |
| bool | is_eof = false |
| float | last_byte_factor = 0.0f |
| int | last_setup_buffer_size = 0 |
| int | max_read_size = DEFAULT_BUFFER_SIZE |
| Stream * | p_stream = nullptr |
| T * | p_transform = nullptr |
| QueueStream< uint8_t > | result_queue {result_queue_buffer} |
| RingBuffer< uint8_t > | result_queue_buffer {0} |
| int | result_queue_factor = 5 |
| size_t | total_bytes_read = 0 |
ConverterStream Helper class which implements the readBytes with the help of write.
| T | class name of the original transformer stream |
|
inline |
Fills the internal queue up to at least DEFAULT_BUFFER_SIZE bytes (if possible) and reports the currently available queue size limited by max_read_size.
|
inline |
setup of the TransformationReader class
| transform | The original transformer stream |
| source | The data source of the data to be converted the requested converted bytes |
|
inline |
|
inlineprotected |
Fills the result queue until at least len bytes are available or no more input data arrives.
|
inline |
|
inline |
|
inlineprotected |
Defines the read buffer size for individual reads.
|
inline |
Defines the queue size for result.
|
inlineprotected |
restores the original output in the converter class
| out |
|
inline |
Defines how a run of MAX_ZERO_READ_COUNT consecutive empty reads from the source is interpreted:
|
inline |
|
inline |
Defines the queue size dependent on the read size.
|
inlineprotected |
|
inlineprotected |
Makes sure that the data is written to the array
| data |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |