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

We combine a datastream which consists of multiple channels into less channels. E.g. 2 to 1 The last target channel will contain the combined values of the exceeding source channels. More...

#include <BaseConverter.h>

Inheritance diagram for ChannelReducer:
BaseConverter

Public Member Functions

 ChannelReducer (int channelCountOfTarget, int channelCountOfSource, int bitsPerSample)
 
size_t convert (uint8_t *src, size_t size)
 
size_t convert (uint8_t *target, uint8_t *src, size_t size)
 

Protected Attributes

int bits
 
int from_channels
 
int to_channels
 

Detailed Description

We combine a datastream which consists of multiple channels into less channels. E.g. 2 to 1 The last target channel will contain the combined values of the exceeding source channels.

Constructor & Destructor Documentation

◆ ChannelReducer()

ChannelReducer ( int  channelCountOfTarget,
int  channelCountOfSource,
int  bitsPerSample 
)
inline

Member Function Documentation

◆ 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

Member Data Documentation

◆ bits

int bits
protected

◆ from_channels

int from_channels
protected

◆ to_channels

int to_channels
protected

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