Linear interpolation between y[0] and y[1].
More...
#include <ResampleStreamT.h>
|
void | addValue (float value) |
| Adds a new value to the buffer, discarding the oldest.
|
|
bool | begin () |
| Constructor. Initializes the buffer with four zeros.
|
|
bool | getValue (float &newValue) |
| Gets the next interpolated value.
|
|
| operator bool () const |
| Returns true if there are more values to read.
|
|
void | setStepSize (float step) |
| Sets the step size for interpolation.
|
|
float | value (float *y, float xf) |
| Computes the linear interpolation.
|
|
float | valueExt (float *y, float xf) |
|
int | vectorSize () |
| Minimum number of values required for interpolation.
|
|
|
float | step = 0 |
|
float | step_size = 1.0f |
| Step size for resampling, default is 1.0.
|
|
SingleBuffer< float > | values |
| Buffer holding the last 4 values for interpolation.
|
|
Linear interpolation between y[0] and y[1].
Valid for xf in [0,1].
◆ addValue()
void addValue |
( |
float |
value | ) |
|
|
inlineinherited |
Adds a new value to the buffer, discarding the oldest.
- Parameters
-
value | The new sample value to add. |
◆ getValue()
bool getValue |
( |
float & |
newValue | ) |
|
|
inlineinherited |
Gets the next interpolated value.
- Parameters
-
newValue | Reference to store the interpolated value. |
- Returns
- True if a value was produced, false if more input is needed.
◆ setStepSize()
void setStepSize |
( |
float |
step | ) |
|
|
inlineinherited |
Sets the step size for interpolation.
- Parameters
-
◆ value()
float value |
( |
float * |
y, |
|
|
float |
xf |
|
) |
| |
|
inlinevirtual |
Computes the linear interpolation.
- Parameters
-
y | Pointer to at least 2 values. |
xf | The fractional index for interpolation. |
- Returns
- Interpolated value.
Implements BaseInterpolator.
◆ vectorSize()
Minimum number of values required for interpolation.
Implements BaseInterpolator.
The documentation for this struct was generated from the following file: