mirror of https://github.com/f4exb/sdrangel.git
Tx ph.2: restored ancient interpolator
This commit is contained in:
parent
63083885be
commit
4618e007de
|
@ -35,7 +35,7 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// interpolation works nearly the same way
|
// interpolation works nearly the same way // TODO: remove when original is used
|
||||||
bool interpolate(Real *distance, const Complex& next, Complex* result)
|
bool interpolate(Real *distance, const Complex& next, Complex* result)
|
||||||
{
|
{
|
||||||
*distance -= 1.0;
|
*distance -= 1.0;
|
||||||
|
@ -54,6 +54,28 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// original interpolator
|
||||||
|
bool interpolate(Real* distance, const Complex& next, bool* consumed, Complex* result)
|
||||||
|
{
|
||||||
|
while(*distance >= 1.0)
|
||||||
|
{
|
||||||
|
if(!(*consumed))
|
||||||
|
{
|
||||||
|
advanceFilter(next);
|
||||||
|
*distance -= 1.0;
|
||||||
|
*consumed = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
doInterpolate((int)floor(*distance * (Real)m_phaseSteps), result);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float* m_taps;
|
float* m_taps;
|
||||||
float* m_alignedTaps;
|
float* m_alignedTaps;
|
||||||
|
|
Loading…
Reference in New Issue