acl/core/sample_interpolator.h¶
#include "acl/core/sample_interpolator.h"
The sample interpolators of the extended samples.
sample_interpolator_t¶
enum class sample_interpolator_t : uint8_t
{
constant = 0,
linear = 1,
};
This enum dictates what interpolation function is used when sampling.
| Value | Description |
|---|---|
constant |
Constant interpolation means that if we sample between value X and X+1, X is returned within that interval. |
linear |
Linear interpolation, classic lerp(a, b, alpha) = a + ((b - a) * alpha). |
get_sample_interpolator_name¶
const char* get_sample_interpolator_name(sample_interpolator_t interpolator)
Returns the string representation for the provided sample interpolator.
get_sample_interpolator¶
bool get_sample_interpolator(
const char* interpolator,
sample_interpolator_t& out_interpolator)
Returns the sample interpolator from its string representation. Returns true on success, false otherwise.