From c75950bd5babfcab323b29b956fa0b620c3c19da Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 12 Dec 2010 13:09:32 -0500 Subject: resampler PFB: Sets relative rate when rate is changed. --- gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc | 3 --- gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'gnuradio-core/src') 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 2136dd843..35455aa12 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 @@ -80,8 +80,6 @@ gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate, create_diff_taps(taps, dtaps); create_taps(taps, d_taps, d_filters); create_taps(dtaps, d_dtaps, d_diff_filters); - - set_relative_rate(rate); } gr_pfb_arb_resampler_ccf::~gr_pfb_arb_resampler_ccf () @@ -179,7 +177,6 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items, // produce output as long as we can and there are enough input samples while((i < noutput_items) && (count < ninput_items[0]-1)) { - // start j by wrapping around mod the number of channels while((j < d_int_rate) && (i < noutput_items)) { // Take the current filter and derivative filter output diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h index 44dd202b9..2c36c95f9 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h @@ -164,6 +164,7 @@ public: void set_rate (float rate) { d_dec_rate = (unsigned int)floor(d_int_rate/rate); d_flt_rate = (d_int_rate/rate) - d_dec_rate; + set_relative_rate(rate); } int general_work (int noutput_items, -- cgit