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

We first bin the channels then we calculate the difference between pairs of channels in a datastream. E.g. For binning, if we bin 4 samples in each channel we will have 4 times less samples per channel E.g. For subtracting if we have 4 channels we end up with 2 channels. The channels will be channel_1 - channel_2 channel_3 - channel_4 This is the same as combining binning and subtracting channels. This will not work if you provide single channel data! More...

#include <BaseConverter.h>

Inheritance diagram for ChannelBinDiffT< T >:
BaseConverter

Public Member Functions

 ChannelBinDiffT (int binSize, int channels, bool average)
 
size_t convert (uint8_t *src, size_t size)
 
size_t convert (uint8_t *target, uint8_t *src, size_t size)
 
void setAverage (bool average)
 
void setBinSize (int binSize)
 
void setChannels (int channels)
 

Protected Attributes

bool average = true
 
int binSize = 4
 
int channels = 2
 
T * partialBin
 
int partialBinSize
 

Detailed Description

template<typename T>
class audio_tools::ChannelBinDiffT< T >

We first bin the channels then we calculate the difference between pairs of channels in a datastream. E.g. For binning, if we bin 4 samples in each channel we will have 4 times less samples per channel E.g. For subtracting if we have 4 channels we end up with 2 channels. The channels will be channel_1 - channel_2 channel_3 - channel_4 This is the same as combining binning and subtracting channels. This will not work if you provide single channel data!

Author
Urs Utzinger
Template Parameters
T

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