summaryrefslogtreecommitdiff
path: root/lib/block_task.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-09-13 19:03:59 -0700
committerJosh Blum2012-09-13 19:03:59 -0700
commit1ec3451161fbbd772490b8b1c7dd3d3c7aad9503 (patch)
tree385dbecf7c228f9420e2dbb374772720546182f2 /lib/block_task.cpp
parent87cd4fe7179a55f1ea34ea90744017c403838542 (diff)
downloadsandhi-1ec3451161fbbd772490b8b1c7dd3d3c7aad9503.tar.gz
sandhi-1ec3451161fbbd772490b8b1c7dd3d3c7aad9503.tar.bz2
sandhi-1ec3451161fbbd772490b8b1c7dd3d3c7aad9503.zip
input buffer history work and fixes
added consume flag to know if user called consume fixes for mini history buff and flag when in use
Diffstat (limited to 'lib/block_task.cpp')
-rw-r--r--lib/block_task.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/block_task.cpp b/lib/block_task.cpp
index 114c073..c3ab0d4 100644
--- a/lib/block_task.cpp
+++ b/lib/block_task.cpp
@@ -124,6 +124,7 @@ void ElementImpl::handle_task(const tsbe::TaskInterface &task_iface)
this->work_input_items[i] = mem;
this->work_ninput_items[i] = items;
num_input_items = std::min(num_input_items, items);
+ this->consume_called[i] = false;
//inline dealings, how and when input buffers can be inlined into output buffers
//TODO, check that the buff.get_affinity() matches this block or we dont inline
@@ -223,7 +224,7 @@ void ElementImpl::handle_task(const tsbe::TaskInterface &task_iface)
for (size_t i = 0; i < num_inputs; i++)
{
ASSERT(enable_fixed_rate or work_ret != Block::WORK_CALLED_PRODUCE);
- const size_t items = (enable_fixed_rate)? (myulround((noutput_items/this->relative_rate))) : this->consume_items[i];
+ const size_t items = (this->consume_called[i])? this->consume_items[i] : (myulround((noutput_items/this->relative_rate)));
this->consume_items[i] = 0;
this->items_consumed[i] += items;