|
arduino-audio-tools
|
Cubic B-spline interpolation using y[0]..y[3]. More...
#include <ResampleStreamT.h>
Public Member Functions | |
| 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 cubic B-spline interpolation. | |
| float | valueExt (float *y, float xf) |
| int | vectorSize () |
| Minimum number of values required for interpolation. | |
Protected Attributes | |
| 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. | |
Cubic B-spline interpolation using y[0]..y[3].
Valid for xf in [0,3].
Adds a new value to the buffer, discarding the oldest.
| value | The new sample value to add. |
|
inlineinherited |
Constructor. Initializes the buffer with four zeros.
Gets the next interpolated value.
| newValue | Reference to store the interpolated value. |
Sets the step size for interpolation.
| step | The new step size. |
Computes the cubic B-spline interpolation.
| y | Pointer to at least 4 values. |
| xf | The fractional index for interpolation. |
Implements BaseInterpolator.
|
inlinevirtual |
Minimum number of values required for interpolation.
Implements BaseInterpolator.
|
protectedinherited |
|
protectedinherited |
Step size for resampling, default is 1.0.
|
protectedinherited |
Buffer holding the last 4 values for interpolation.