From c1bca33715f76655c34e35515961eccd3eaa292b Mon Sep 17 00:00:00 2001
From: Tom <trondeau@vt.edu>
Date: Mon, 19 Oct 2009 23:18:07 -0400
Subject: Working on fixing arbitrary resampler not working for rate < 1.0;
 this fixes it for 0.5<=rate<=1.0 range.

---
 gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'gnuradio-core/src/lib')

diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
index 8971d3d39..392f38a8f 100644
--- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
+++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
@@ -184,7 +184,8 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items,
       d_acc = fmodf(d_acc, 1.0);
     }
     if(i < noutput_items) {              // keep state for next entry
-      count++;                           // we have fully consumed another input
+      float ss = (int)(j / d_int_rate);  // number of items to skip ahead by
+      count += ss;                       // we have fully consumed another input
       j = j % d_int_rate;                // roll filter around
     }
   }
-- 
cgit v1.2.3