commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/11: analog: Addresses issue #831.


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/11: analog: Addresses issue #831.
Date: Sun, 17 Jan 2016 18:02:47 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit f44e66c9c21062037db19b8fd98f33984dff36e0
Author: Tom Rondeau <address@hidden>
Date:   Wed Jan 6 16:59:42 2016 -0500

    analog: Addresses issue #831.
    
    We changed from using set_output_multiple(interpolate) because data
    would not necessarily continue to flow through properly. This meant
    that we needed to check the input size in the work function because if
    we cycle through the filters, we can sometimes consume more inputs
    than we've been given, which messes up the consume/produce and
    bookkeeping.
    
    It's likely that we can find a better form of the forecast function
    here that does not require checking both noutput_items and
    ninput_items[0] in the while loop.
---
 gr-filter/lib/rational_resampler_base_XXX_impl.cc.t | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gr-filter/lib/rational_resampler_base_XXX_impl.cc.t 
b/gr-filter/lib/rational_resampler_base_XXX_impl.cc.t
index ef98af3..0b74e60 100644
--- a/gr-filter/lib/rational_resampler_base_XXX_impl.cc.t
+++ b/gr-filter/lib/rational_resampler_base_XXX_impl.cc.t
@@ -154,19 +154,21 @@ namespace gr {
       }
 
       unsigned int ctr = d_ctr;
+      int count = 0;
 
       int i = 0;
-      while(i < noutput_items) {
+      while((i < noutput_items) && (count < ninput_items[0])) {
        out[i++] = d_firs[ctr]->filter(in);
        ctr += decimation();
        while(ctr >= interpolation()) {
          ctr -= interpolation();
          in++;
+          count++;
        }
       }
 
       d_ctr = ctr;
-      consume_each(in - (@address@hidden)input_items[0]);
+      consume_each(count);
       return i;
     }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]