Template Class GainInterpolator¶
Defined in File gain_interpolator.hpp
Class Documentation¶
-
template<typename InterpType>
class ear::dsp::GainInterpolator¶ Gain interpolator, templated over an interpolation type which defines the type of interpolation (linear, cosine etc.), the type of the values to interpolate between (floats, vectors, matrices), and therefore restrictions on the input and output channel sizes.
An interpolation curve is defined by the points in interp_points. Each of these is a pair of the sample index and the gain values at that time. These must be sorted in time order. Duplicate times can be used to specify steps.
See LinearInterpSingle, LinearInterpVector and LinearInterpMatrix for possible interpolation types. See InterpType for the interface that interpolation types define.
Public Functions
-
inline void process(SampleIndex block_start, size_t nsamples, const float *const *in, float *const *out)¶
Process n samples.
- Parameters
block_start – the index of the first sample relative to the sample indices in interp_points
nsamples – number of samples in
in
andout
in – input samples with a number of channels compatible with the interpolation type and points used
out – output samples with a number of channels compatible with the interpolation type and points used
Public Members
-
std::vector<std::pair<SampleIndex, typename InterpType::Point>> interp_points¶
-
inline void process(SampleIndex block_start, size_t nsamples, const float *const *in, float *const *out)¶