Flan
|
Fractional delay filter bank-based interpolator class. More...
#include <CDSPFracInterpolator.h>
Public Member Functions | |
CDSPFracInterpolator (const double aSrcSampleRate, const double aDstSampleRate, const double ReqAtten, const bool IsThird, const double PrevLatency) | |
Constructor initalizes the interpolator. More... | |
virtual int | getLatency () const |
virtual double | getLatencyFrac () const |
virtual int | getMaxOutLen (const int MaxInLen) const |
virtual void | clear () |
Function clears (resets) the state of *this object and returns it to the state after construction. More... | |
virtual int | process (double *ip, int l, double *&op0) |
Function performs DSP processing. More... | |
Fractional delay filter bank-based interpolator class.
Class implements the fractional delay interpolator. This implementation at first puts the input signal into a ring buffer and then performs interpolation. The interpolation is performed using sinc-based fractional delay filters. These filters are contained in a bank, and for higher precision they are interpolated between adjacent filters.
To increase sample timing precision, this class uses "resettable counter" approach. This gives zero overall sample timing error. With the R8B_FASTTIMING configuration option enabled, the sample timing experiences a very minor drift.
|
inline |
Constructor initalizes the interpolator.
It is important to call the getMaxOutLen() function afterwards to obtain the optimal output buffer length.
aSrcSampleRate | Source sample rate. |
aDstSampleRate | Destination sample rate. |
ReqAtten | Required filter attentuation. |
IsThird | "True" if one-third filter is required. |
PrevLatency | Latency, in samples (any value >=0), which was left in the output signal by a previous process. This latency will be consumed completely. |
|
inlinevirtual |
Function clears (resets) the state of *this object and returns it to the state after construction.
All input data accumulated in the internal buffer so far will be discarded.
Implements r8b::CDSPProcessor.
|
inlinevirtual |
Implements r8b::CDSPProcessor.
|
inlinevirtual |
Implements r8b::CDSPProcessor.
|
inlinevirtual |
MaxInLen | The number of samples planned to process at once, at most. |
Implements r8b::CDSPProcessor.
|
inlinevirtual |
Function performs DSP processing.
ip | Input data pointer. | |
l0 | How many samples to process. | |
[out] | op0 | Output data pointer. The capacity of this buffer should be equal to the value returned by the getMaxOutLen() function for the given "l0". This buffer can be equal to "ip" only if the getMaxOutLen( l0 ) function returned a value lesser than "l0". This pointer can be incremented on function's return if latency compensation was performed by the processor. Note that on function's return, this pointer may point to some internal buffers, including the "ip" buffer, ignoring the originally passed value. |
Implements r8b::CDSPProcessor.