|
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 | 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 | is_eof = false |
| 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 |
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.
setup of the TransformationReader class
| transform | The original transformer stream |
| source | The data source of the data to be converted the requested converted bytes |
Fills the result queue until at least len bytes are available or no more input data arrives.
Defines the read buffer size for individual reads.
restores the original output in the converter class
| out |
Defines the queue size dependent on the read size.
Makes sure that the data is written to the array
| data |
|
protected |
|
protected |
|
protected |