diff --git a/radio/interpolation/Farrow.hpp b/radio/interpolation/Farrow.hpp index b4a3f3d..bcf0fb5 100644 --- a/radio/interpolation/Farrow.hpp +++ b/radio/interpolation/Farrow.hpp @@ -70,7 +70,7 @@ public: m_fifo[m_w] = x; } - ComplexScalar process(ComplexScalar const &xin, RealScalar dmu) + ComplexScalar process_new(ComplexScalar const &xin, RealScalar dmu) { size_t adv = m_interpolator.process(dmu); m_bufferIn.write(&xin, 1); @@ -101,29 +101,6 @@ public: uint32_t i, r; int32_t j; - if (pop and m_bufferIn.len() == 0) - { - return ComplexScalar(0,0); - } - - for (int n=0; n < m_bufferIn.len(); n++) - { - ComplexScalar x; - m_bufferIn.read(&x, 1); - FirComplex::feed(x); - - // Partial filter responses - for (i=0; i < m_M; i++) - { - m_h[i] = FirComplex::processReal(column(m_coeff, i)); - } - - // Combine - ComplexScalar y = horner(mu); - m_bufferOut.write(&y, 1); - } - -#if 0 m_r = (m_r + pop) % m_N; if (pop) @@ -140,7 +117,15 @@ public: m_state[j--] = m_fifo[r++]; } } -#endif + + // Partial filter responses + for (i=0; i < m_M; i++) + { + m_h[i] = FirComplex::processReal(column(m_coeff, i)); + } + + // Combine + return horner(mu); } void load(const char *pFilename) @@ -221,4 +206,4 @@ private: } // Radio::Interpolation } // ::Radio -#endif // _INTERPOLATION_FARROW_HPP_ \ No newline at end of file +#endif // _INTERPOLATION_FARROW_HPP_