Template Struct InterpType¶
Defined in File gain_interpolator.hpp
Struct Documentation¶
-
template<typename PointT>
struct ear::dsp::InterpType¶ Base type for interpolation types.
Public Types
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 toout
.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
andout
to start processingrange_end – offset in
in
andout
to end processingblock_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 toout
.- Parameters
in – input samples
out – output samples
range_start – offset in
in
andout
to start processingrange_end – offset in
in
andout
to end processingpoint – gain values to apply
-
static inline bool constant_interp(const Point &a, const Point &b)¶