|
r8brain-free-src
High-quality pro audio sample rate converter library
|
Sinc function-based fractional delay filter bank class. More...
#include <CDSPFracInterpolator.h>
Public Member Functions | |
| CDSPFracDelayFilterBank (const int aFilterFracs, const int aElementSize, const int aInterpPoints, const double aReqAtten, const bool aIsThird) | |
| int | getFilterFracs () const |
| int | getFilterLen () const |
| const double & | operator[] (const int i) const |
| void | unref () |
Static Public Member Functions | |
| static void | roundReqAtten (double &att, const bool aIsThird) |
Friends | |
| class | CDSPFracDelayFilterBankCache |
Sinc function-based fractional delay filter bank class.
Class implements storage and initialization of a bank of sinc-based fractional delay filters, expressed as 0th, 1st, 2nd or 3rd order polynomial interpolation coefficients. The filters are windowed by the "Kaiser" power-raised window function.
| r8b::CDSPFracDelayFilterBank::CDSPFracDelayFilterBank | ( | const int | aFilterFracs, |
| const int | aElementSize, | ||
| const int | aInterpPoints, | ||
| const double | aReqAtten, | ||
| const bool | aIsThird | ||
| ) |
Constructor.
| aFilterFracs | The number of fractional delay positions to sample, -1 - use default. |
| aElementSize | The size of each filter's tap, in "double" values. This parameter corresponds to the complexity of interpolation. 4 should be set for 3rd order, 3 for 2nd order, 2 for linear interpolation, 1 for whole-numbered stepping. |
| aInterpPoints | The number of points the interpolation is based on. This value should not be confused with the ElementSize. Set to 2 for linear or no interpolation. |
| aReqAtten | Required filter attentuation. |
| aIsThird | "True" if one-third filter is required. |
| int r8b::CDSPFracDelayFilterBank::getFilterFracs | ( | ) | const |
| int r8b::CDSPFracDelayFilterBank::getFilterLen | ( | ) | const |
| const double & r8b::CDSPFracDelayFilterBank::operator[] | ( | const int | i | ) | const |
| i | Filter index, in the range 0 to FilterFracs, inclusive. |
|
static |
Function "rounds" the specified attenuation to the nearest effective value.
| [in,out] | att | Required filter attentuation. Will be rounded to the nearest value. |
| aIsThird | "True" if one-third filter is required. |
| void r8b::CDSPFracDelayFilterBank::unref | ( | ) |
This function should be called when the filter bank obtained via the filter bank cache is no longer needed.