diff options
author | Josh Blum | 2012-09-13 22:25:30 -0700 |
---|---|---|
committer | Josh Blum | 2012-09-13 22:25:30 -0700 |
commit | cae524fdf1da052cd70f3a872a8db4e80f202504 (patch) | |
tree | 6fbb198c92789d556029c976857ef652a527480c /lib | |
parent | 85b29ab7235d85ff17062cf8521f522b5a84fe3d (diff) | |
download | sandhi-cae524fdf1da052cd70f3a872a8db4e80f202504.tar.gz sandhi-cae524fdf1da052cd70f3a872a8db4e80f202504.tar.bz2 sandhi-cae524fdf1da052cd70f3a872a8db4e80f202504.zip |
make input history calls and history compat for off by 1 issue
Diffstat (limited to 'lib')
-rw-r--r-- | lib/block.cpp | 6 | ||||
-rw-r--r-- | lib/gras_impl/input_buffer_queues.hpp | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/block.cpp b/lib/block.cpp index bb55a3f..406e16b 100644 --- a/lib/block.cpp +++ b/lib/block.cpp @@ -28,7 +28,7 @@ Block::Block(void) Block::Block(const std::string &name): Element(name) { - this->set_history(0); + this->set_input_history(0); this->set_output_multiple(1); this->set_fixed_rate(true); this->set_relative_rate(1.0); @@ -67,12 +67,12 @@ typename V::value_type vector_get(const V &v, const size_t index) return v[index]; } -size_t Block::history(const size_t which_input) const +size_t Block::input_history(const size_t which_input) const { return vector_get((*this)->input_history_items, which_input); } -void Block::set_history(const size_t history, const size_t which_input) +void Block::set_input_history(const size_t history, const size_t which_input) { vector_set((*this)->input_history_items, history, which_input); } diff --git a/lib/gras_impl/input_buffer_queues.hpp b/lib/gras_impl/input_buffer_queues.hpp index 8d00d85..9e7bf63 100644 --- a/lib/gras_impl/input_buffer_queues.hpp +++ b/lib/gras_impl/input_buffer_queues.hpp @@ -159,7 +159,6 @@ inline void InputBufferQueues::init( //determine byte sizes for buffers and dealing with history _history_bytes[i] = input_item_sizes[i]*input_history_items[i]; - if (_history_bytes[i]) _history_bytes[i] -= input_item_sizes[i]; //crazy history-1 API //calculate the input multiple aka reserve size _reserve_bytes[i] = input_item_sizes[i]*input_multiple_items[i]; |