summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJosh Blum2012-10-13 16:17:56 -0700
committerJosh Blum2012-10-13 16:17:56 -0700
commite9e370f16b96563583e75855e9890c5d2d86c624 (patch)
tree8063328f5f489cc896982fc84bbd1af7f52b9b63 /lib
parentac9abbbcfdbc5efc715ea49bb0319b2408cca359 (diff)
downloadsandhi-e9e370f16b96563583e75855e9890c5d2d86c624.tar.gz
sandhi-e9e370f16b96563583e75855e9890c5d2d86c624.tar.bz2
sandhi-e9e370f16b96563583e75855e9890c5d2d86c624.zip
change to fixed_rate_noutput_to_ninput in block for non fixed rates
Diffstat (limited to 'lib')
-rw-r--r--lib/gr_block.cpp9
-rw-r--r--lib/top_block.cpp1
2 files changed, 9 insertions, 1 deletions
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)