arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NumberReader Class Reference

Reads n numbers from an Arduino Stream. More...

#include <BaseConverter.h>

Public Member Functions

 NumberReader ()
 
 NumberReader (Stream &in)
 
bool read (int inBits, int outBits, bool outSigned, int n, int32_t *result)
 
bool toNumbers (void *bufferIn, int inBits, int outBits, bool outSigned, int n, int32_t *result)
 converts a buffer to a number array
 

Protected Member Functions

int32_t scale (int32_t value, int inBits, int outBits, bool outSigned=true)
 scale the value
 

Protected Attributes

Streamstream_ptr = nullptr
 

Detailed Description

Reads n numbers from an Arduino Stream.

Constructor & Destructor Documentation

◆ NumberReader() [1/2]

NumberReader ( Stream in)
inline

◆ NumberReader() [2/2]

NumberReader ( )
inline

Member Function Documentation

◆ read()

bool read ( int  inBits,
int  outBits,
bool  outSigned,
int  n,
int32_t result 
)
inline

◆ scale()

int32_t scale ( int32_t  value,
int  inBits,
int  outBits,
bool  outSigned = true 
)
inlineprotected

scale the value

◆ toNumbers()

bool toNumbers ( void bufferIn,
int  inBits,
int  outBits,
bool  outSigned,
int  n,
int32_t result 
)
inline

converts a buffer to a number array

Member Data Documentation

◆ stream_ptr

Stream* stream_ptr = nullptr
protected

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