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

Provides combination of binning and subtracting channels. More...

#include <BaseConverter.h>

Inheritance diagram for ChannelBinDiff:
BaseConverter

Classes

struct  ChannelBinDiffState
 
struct  ChannelBinDiffStateT
 

Public Member Functions

 ChannelBinDiff ()=default
 
 ChannelBinDiff (int binSize, int channels, bool average, int bits_per_sample)
 
 ~ChannelBinDiff () 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 = true
 
int binSize = 4
 
int bits = 16
 
int channels = 2
 
ChannelBinDiffStatestate = nullptr
 

Detailed Description

Provides combination of binning and subtracting channels.

Author
Urs Utzinger
Template Parameters
T

Constructor & Destructor Documentation

◆ ChannelBinDiff() [1/2]

ChannelBinDiff ( )
default

◆ ChannelBinDiff() [2/2]

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

◆ ~ChannelBinDiff()

~ChannelBinDiff ( )
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 = true
protected

◆ binSize

int binSize = 4
protected

◆ bits

int bits = 16
protected

◆ channels

int channels = 2
protected

◆ state

ChannelBinDiffState* state = nullptr
protected

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