diff --git a/radio/Interpolation.hpp b/radio/Interpolation.hpp index a234d87..172a970 100644 --- a/radio/Interpolation.hpp +++ b/radio/Interpolation.hpp @@ -316,19 +316,23 @@ public: { uint32_t i; uint32_t j; - ComplexScalar res(0,0); j = 0; for (i=0; i < len; i++) { m_pFir[m_currStage].feed(src(i)); - res += m_pFir[m_currStage].processReal(m_pCoeff[m_currStage]); - m_currStage--; - if (m_currStage >= m_M) + if (m_currStage == (m_M-1)) + { + dst(j) = m_pFir[m_currStage].processReal(m_pCoeff[m_currStage]); + } + else + { + dst(j) += m_pFir[m_currStage].processReal(m_pCoeff[m_currStage]); + } + if (--m_currStage >= m_M) { - dst(j++) = res; - res = ComplexScalar(0,0); m_currStage = m_M-1; + j++; } }