arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members
MultiChannelResampler< TInterpolator > Class Template Reference

Multi-channel resampler that applies a BaseInterpolator-derived algorithm to each channel. More...

#include <ResampleStreamT.h>

Public Member Functions

void addValue (float value, int channel)
 
void addValues (const float *values)
 Adds a new value for each channel.
 
int channels () const
 Returns the number of channels.
 
bool getValues (float *out)
 Gets the next interpolated value for each channel.
 
 operator bool () const
 
void setChannels (int channels)
 
void setStepSize (float step)
 Sets the step size for all channels.
 

Protected Attributes

int _channels = 0
 
Vector< TInterpolator > _resamplers
 

Detailed Description

template<class TInterpolator>
class audio_tools::MultiChannelResampler< TInterpolator >

Multi-channel resampler that applies a BaseInterpolator-derived algorithm to each channel.

Template Parameters
TInterpolatorThe resampler type (must derive from BaseInterpolator).

Member Function Documentation

◆ addValues()

template<class TInterpolator >
void addValues ( const float *  values)
inline

Adds a new value for each channel.

Parameters
valuesArray of input values, one per channel.

◆ getValues()

template<class TInterpolator >
bool getValues ( float *  out)
inline

Gets the next interpolated value for each channel.

Parameters
outArray to store the interpolated values, one per channel.
Returns
True if values were produced, false if more input is needed.

◆ setStepSize()

template<class TInterpolator >
void setStepSize ( float  step)
inline

Sets the step size for all channels.

Parameters
stepThe new step size.

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