Template Struct InterpType

Struct Documentation

template<typename PointT>
struct ear::dsp::InterpType

Base type for interpolation types.

Public Types

using Point = PointT

Type of points on the interpolation curve, for example float, vector, matrix.

Public Static Functions

static inline bool constant_interp(const Point &a, const Point &b)

Are the two points the same (and therefore constant/no interpolation should be used between them)?

static void apply_interp(const float *const *in, float *const *out, SampleIndex range_start, SampleIndex range_end, SampleIndex block_start, SampleIndex start, SampleIndex end, const Point &start_point, const Point &end_point)

Apply interpolated gains to in, writing to out.

For example, if an interpolation curve goes from x to y between sample 5 and 15, these calls would occur for the first and second 10-sample blocks:

apply_interp(in_a, out_a, 5, 10, 0, 5, 15, x, y);
apply_interp(in_b, out_b, 0, 5, 10, 5, 15, x, y);

Parameters
  • in – input samples

  • out – output samples

  • range_start – offset in in and out to start processing

  • range_end – offset in in and out to end processing

  • block_start – start sample index of this block, i.e. in[0][0]

  • start – start sample index of interpolation curve

  • end – end sample index of interpolation curve

  • start_point – gain values at start

  • end_point – gain values at end

static void apply_constant(const float *const *in, float *const *out, SampleIndex range_start, SampleIndex range_end, const Point &point)

Apply constnt gain gains to in, writing to out.

Parameters
  • in – input samples

  • out – output samples

  • range_start – offset in in and out to start processing

  • range_end – offset in in and out to end processing

  • point – gain values to apply