From 10d65867b80f796da27c82443734cc20e99b672e Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 2 Jan 2012 19:27:29 -0500 Subject: scheduler: if the block is an interpolator that needs a minimum of some number of outputs based on the inputs, let it. This is an acceptable (actually, necessary) exception to the specified limit. --- gnuradio-core/src/lib/runtime/gr_block_executor.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnuradio-core/src/lib/runtime/gr_block_executor.cc b/gnuradio-core/src/lib/runtime/gr_block_executor.cc index 0403ce138..ef53baf78 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_executor.cc +++ b/gnuradio-core/src/lib/runtime/gr_block_executor.cc @@ -182,6 +182,7 @@ gr_block_executor::run_one_iteration() { int noutput_items; int max_items_avail; + int max_noutput_items = d_max_noutput_items; gr_block *m = d_block.get(); gr_block_detail *d = m->detail().get(); @@ -309,8 +310,11 @@ gr_block_executor::run_one_iteration() reqd_noutput_items = round_up(reqd_noutput_items, m->output_multiple()); if (reqd_noutput_items > 0 && reqd_noutput_items <= noutput_items) noutput_items = reqd_noutput_items; + + // if we need this many outputs, overrule the max_noutput_items setting + max_noutput_items = std::max(m->output_multiple(), max_noutput_items); } - noutput_items = std::min(noutput_items, d_max_noutput_items); + noutput_items = std::min(noutput_items, max_noutput_items); // ask the block how much input they need to produce noutput_items m->forecast (noutput_items, d_ninput_items_required); -- cgit