![]() |
r8brain-free-src
High-quality pro audio sample rate converter library
|
The base virtual class for DSP processing algorithms. More...
#include <CDSPProcessor.h>
Public Member Functions | |
virtual void | clear ()=0 |
virtual int | getInLenBeforeOutPos (const int ReqOutPos) const =0 |
virtual int | getLatency () const =0 |
virtual double | getLatencyFrac () const =0 |
virtual int | getMaxOutLen (const int MaxInLen) const =0 |
virtual int | process (double *ip, int l0, double *&op0)=0 |
The base virtual class for DSP processing algorithms.
This class can be used as a base class for various DSP processing algorithms (processors). DSP processors that are derived from this class can be seamlessly integrated into various DSP processing graphs.
|
pure virtual |
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.
Implemented in r8b::CDSPBlockConvolver, r8b::CDSPFracInterpolator, r8b::CDSPHBDownsampler, r8b::CDSPHBUpsampler, and r8b::CDSPResampler.
|
pure virtual |
Function returns the number of input samples required to advance to the specified output sample position (so that the next process() call passes this output position), starting at the cleared or after-construction state of *this object.
Note that the implementation of this function assumes the caller only needs to estimate an initial buffering requirement; passing a full sample length value (e.g., greater than 100000) may overflow the calculation or cause rounding errors.
ReqOutPos | The required output position. Set to 0 to obtain "input length before output start" latency. Must be a non-negative value. |
Implemented in r8b::CDSPBlockConvolver, r8b::CDSPFracInterpolator, r8b::CDSPHBDownsampler, r8b::CDSPHBUpsampler, and r8b::CDSPResampler.
|
pure virtual |
Implemented in r8b::CDSPBlockConvolver, r8b::CDSPFracInterpolator, r8b::CDSPHBDownsampler, r8b::CDSPHBUpsampler, and r8b::CDSPResampler.
|
pure virtual |
Implemented in r8b::CDSPBlockConvolver, r8b::CDSPFracInterpolator, r8b::CDSPHBDownsampler, r8b::CDSPHBUpsampler, and r8b::CDSPResampler.
|
pure virtual |
MaxInLen | The number of samples planned to process at once, at most. |
Implemented in r8b::CDSPBlockConvolver, r8b::CDSPFracInterpolator, r8b::CDSPHBDownsampler, r8b::CDSPHBUpsampler, and r8b::CDSPResampler.
|
pure virtual |
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. |
Implemented in r8b::CDSPFracInterpolator, r8b::CDSPHBDownsampler, r8b::CDSPHBUpsampler, r8b::CDSPBlockConvolver, and r8b::CDSPResampler.