summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.txt3
-rw-r--r--lib/gr_block.cpp9
-rw-r--r--lib/top_block.cpp1
3 files changed, 10 insertions, 3 deletions
diff --git a/TODO.txt b/TODO.txt
index 59c8cd4..1c9fe17 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -8,6 +8,7 @@
* handle forecast
** not 100% sure here with the input/output edge case sizes
+** forecast + input buffer accumulate
* add hooks to specify input reserve
** automatically calculate from output multiple and rel rate
@@ -38,7 +39,5 @@ and not directly from block::<method>
* want per-port token_pool for inputs and outputs
** if ports get removed, this will release subscribers
-* forecast + input buffer accumulate
-
* token check for top block stop
** fixes qa UDP so we dont wait for inert message
diff --git a/lib/gr_block.cpp b/lib/gr_block.cpp
index a384af1..b32158a 100644
--- a/lib/gr_block.cpp
+++ b/lib/gr_block.cpp
@@ -80,7 +80,14 @@ bool gr_block::is_unaligned(void)
size_t gr_block::fixed_rate_noutput_to_ninput(const size_t noutput_items)
{
- return size_t(0.5 + (noutput_items/this->relative_rate())) + this->history() - 1;
+ if ((*this)->block->enable_fixed_rate)
+ {
+ return size_t(0.5 + (noutput_items/this->relative_rate())) + this->history() - 1;
+ }
+ else
+ {
+ return noutput_items + this->history() - 1;
+ }
}
size_t gr_block::interpolation(void) const
diff --git a/lib/top_block.cpp b/lib/top_block.cpp
index d71a4a7..a09744e 100644
--- a/lib/top_block.cpp
+++ b/lib/top_block.cpp
@@ -107,6 +107,7 @@ void TopBlock::run(void)
{
this->start();
this->wait();
+ this->disconnect_all();
}
GRAS_FORCE_INLINE void wait_thread_yield(void)