arduino-audio-tools
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TransformationReader< T > Class Template Reference

ConverterStream Helper class which implements the converting readBytes with the help of write. More...

#include <ResampleStream.h>

Classes

class  AdapterPrintToArray
 

Public Member Functions

int availableForWrite ()
 
void begin (T *transform, Stream *source)
 setup of the TransformationReader class More...
 
size_t readBytes (uint8_t *data, size_t byteCount)
 

Protected Member Functions

float getByteFactor ()
 
void restoreOutput (Print *out)
 restores the original output in the converter class More...
 
PrintsetupOutput (uint8_t *data, size_t byteCount)
 

Protected Attributes

bool active = false
 
Vector< uint8_t > buffer {0}
 
float byte_factor = 0.0f
 
Streamp_stream = nullptr
 
T * p_transform = nullptr
 
audio_tools::TransformationReader::AdapterPrintToArray print_to_array
 

Detailed Description

template<class T>
class audio_tools::TransformationReader< T >

ConverterStream Helper class which implements the converting readBytes with the help of write.

Author
Phil Schatzmann
Template Parameters
Tclass name of the original transformer stream

Member Function Documentation

◆ begin()

void begin ( T *  transform,
Stream source 
)
inline

setup of the TransformationReader class

Parameters
transformThe original transformer stream
byteFactorThe factor of how much more data we need to read to get the requested converted bytes
sourceThe data source of the data to be converted

◆ restoreOutput()

void restoreOutput ( Print out)
inlineprotected

restores the original output in the converter class

Parameters
out

◆ setupOutput()

Print* setupOutput ( uint8_t *  data,
size_t  byteCount 
)
inlineprotected

Makes sure that the data is written to the array

Parameters
data
byteCount
Returns
original output of the converter class

The documentation for this class was generated from the following file: