arduino-audio-tools
Loading...
Searching...
No Matches
Bin Class Reference

Provides reduced sampling rates through binning. More...

#include <BaseConverter.h>

Inheritance diagram for Bin:
BaseConverter

Classes

struct  BinState
struct  BinStateT

Public Member Functions

 Bin ()=default
 Bin (int binSize, int channels, bool average, int bits_per_sample)
 ~Bin () override
void clear ()
size_t convert (uint8_t *src, size_t size)
size_t convert (uint8_t *target, uint8_t *src, size_t size)
void reset ()
void setAverage (bool average)
void setBinSize (int binSize)
void setBits (int bits)
void setChannels (int channels)

Protected Member Functions

bool isConfigValid ()
void resetState ()

Protected Attributes

bool average = false
int binSize = 1
int bits = 16
int channels = 2
BinState * state = nullptr

Detailed Description

Provides reduced sampling rates through binning.

Constructor & Destructor Documentation

◆ Bin() [1/2]

Bin ( )
default

◆ Bin() [2/2]

Bin ( int binSize,
int channels,
bool average,
int bits_per_sample )
inline

◆ ~Bin()

~Bin ( )
inlineoverride

Member Function Documentation

◆ clear()

void clear ( )
inline

◆ convert() [1/2]

size_t convert ( uint8_t * src,
size_t size )
inlinevirtual

Implements BaseConverter.

◆ convert() [2/2]

size_t convert ( uint8_t * target,
uint8_t * src,
size_t size )
inline

◆ isConfigValid()

bool isConfigValid ( )
inlineprotected

◆ reset()

void reset ( )
inline

◆ resetState()

void resetState ( )
inlineprotected

◆ setAverage()

void setAverage ( bool average)
inline

◆ setBinSize()

void setBinSize ( int binSize)
inline

◆ setBits()

void setBits ( int bits)
inline

◆ setChannels()

void setChannels ( int channels)
inline

Member Data Documentation

◆ average

bool average = false
protected

◆ binSize

int binSize = 1
protected

◆ bits

int bits = 16
protected

◆ channels

int channels = 2
protected

◆ state

BinState* state = nullptr
protected

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