summaryrefslogtreecommitdiff
path: root/gnuradio-core/src
diff options
context:
space:
mode:
authorTom2009-10-19 23:18:07 -0400
committerTom2009-10-19 23:18:07 -0400
commitc1bca33715f76655c34e35515961eccd3eaa292b (patch)
tree46d6c96a5cde2cd81c5020086d2e75ce0443a2e4 /gnuradio-core/src
parent36a02055f0951e9f123445e1bd82a6d1eb030ac3 (diff)
downloadgnuradio-c1bca33715f76655c34e35515961eccd3eaa292b.tar.gz
gnuradio-c1bca33715f76655c34e35515961eccd3eaa292b.tar.bz2
gnuradio-c1bca33715f76655c34e35515961eccd3eaa292b.zip
Working on fixing arbitrary resampler not working for rate < 1.0; this fixes it for 0.5<=rate<=1.0 range.
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r--gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc3
1 files changed, 2 insertions, 1 deletions
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
}
}