arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ChannelAvgT< T, AvgT > Class Template Reference

We average pairs of channels in a datastream. E.g. if we have 4 channels we end up with 2 channels. The channels will be (channel_1 + channel_2)/2 (channel_3 - channel_4)/2. This is equivalent of stereo to mono conversion but will also work for quadric, sexic or octic audio. This will not work if you provide single channel data! More...

#include <BaseConverter.h>

Inheritance diagram for ChannelAvgT< T, AvgT >:
BaseConverter

Public Member Functions

 ChannelAvgT ()
 
size_t convert (uint8_t *src, size_t size) override
 
size_t convert (uint8_t *target, uint8_t *src, size_t size)
 

Detailed Description

template<typename T = int16_t, typename AvgT = float>
class audio_tools::ChannelAvgT< T, AvgT >

We average pairs of channels in a datastream. E.g. if we have 4 channels we end up with 2 channels. The channels will be (channel_1 + channel_2)/2 (channel_3 - channel_4)/2. This is equivalent of stereo to mono conversion but will also work for quadric, sexic or octic audio. This will not work if you provide single channel data!

Author
Urs Utzinger
Template Parameters
T

Constructor & Destructor Documentation

◆ ChannelAvgT()

template<typename T = int16_t, typename AvgT = float>
ChannelAvgT ( )
inline

Member Function Documentation

◆ convert() [1/2]

template<typename T = int16_t, typename AvgT = float>
size_t convert ( uint8_t src,
size_t  size 
)
inlineoverridevirtual

Implements BaseConverter.

◆ convert() [2/2]

template<typename T = int16_t, typename AvgT = float>
size_t convert ( uint8_t target,
uint8_t src,
size_t  size 
)
inline

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