Working on fixing arbitrary resampler not working for rate < 1.0; this fixes it for...
authorTom <trondeau@vt.edu>
Tue, 20 Oct 2009 03:18:07 +0000 (23:18 -0400)
committerTom <trondeau@vt.edu>
Tue, 20 Oct 2009 03:18:07 +0000 (23:18 -0400)
gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc

index 8971d3d39bb5001598559ddee61a6b039c208894..392f38a8f5f999683a908e07655c9f91bbd4bf3e 100644 (file)
@@ -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
     }
   }