diff options
author | Ethan Trewhitt <ethan@trewhitt.org> | 2014-02-21 21:26:50 -0500 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2014-02-22 14:02:39 -0800 |
commit | 6c139b8908b2edaaf6d5d9634b56683eecd74ac2 (patch) | |
tree | 88cc022244ac80edfb9c9999ccd341e396cd9348 /gnuradio-runtime/lib/block_executor.cc | |
parent | 7b61c1d39f757e5c919c15b9b171c80088358f25 (diff) |
Corrected double-to-int conversion in tags propagation that should have included rounding behavior
Diffstat (limited to 'gnuradio-runtime/lib/block_executor.cc')
-rw-r--r-- | gnuradio-runtime/lib/block_executor.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/block_executor.cc b/gnuradio-runtime/lib/block_executor.cc index ee22ef55e3..d3718202d1 100644 --- a/gnuradio-runtime/lib/block_executor.cc +++ b/gnuradio-runtime/lib/block_executor.cc @@ -121,7 +121,8 @@ namespace gr { else { for(t = rtags.begin(); t != rtags.end(); t++) { tag_t new_tag = *t; - new_tag.offset *= rrate; + //new_tag.offset *= rrate; + new_tag.offset = ((double)new_tag.offset * rrate) + 0.5; for(int o = 0; o < d->noutputs(); o++) d->output(o)->add_item_tag(new_tag); } @@ -140,7 +141,8 @@ namespace gr { std::vector<tag_t>::iterator t; for(t = rtags.begin(); t != rtags.end(); t++) { tag_t new_tag = *t; - new_tag.offset *= rrate; + //new_tag.offset *= rrate; + new_tag.offset = ((double)new_tag.offset * rrate) + 0.5; d->output(i)->add_item_tag(new_tag); } } |