summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2012-10-01 20:12:40 -0700
committerJosh Blum2012-10-01 20:12:40 -0700
commitbc1d4e117fab42150bc62d1940e142dd6d10aadc (patch)
tree343eb0fa95896b0015e9188d1cf82c8624e25be6
parent29a2a6679ba8c149b1220d06225abaf89d8c88f0 (diff)
downloadsandhi-bc1d4e117fab42150bc62d1940e142dd6d10aadc.tar.gz
sandhi-bc1d4e117fab42150bc62d1940e142dd6d10aadc.tar.bz2
sandhi-bc1d4e117fab42150bc62d1940e142dd6d10aadc.zip
revert buffer queue changes, unknown issue
-rw-r--r--lib/gras_impl/buffer_queue.hpp14
-rw-r--r--lib/gras_impl/input_buffer_queues.hpp4
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/gras_impl/buffer_queue.hpp b/lib/gras_impl/buffer_queue.hpp
index e9950b8..b3c9cf7 100644
--- a/lib/gras_impl/buffer_queue.hpp
+++ b/lib/gras_impl/buffer_queue.hpp
@@ -19,26 +19,26 @@
#include <gnuradio/sbuffer.hpp>
#include <boost/bind.hpp>
-#include <boost/circular_buffer.hpp>
+#include <queue>
namespace gnuradio
{
-struct BufferQueue : boost::circular_buffer<SBuffer>
+struct BufferQueue : std::queue<SBuffer>
{
- enum {MAX_QUEUE_SIZE = 4};
-
BufferQueue(void)
{
- this->resize(MAX_QUEUE_SIZE);
- SBufferDeleter deleter = boost::bind(&BufferQueue::push_back, this, _1);
+ SBufferDeleter deleter = boost::bind(&BufferQueue::push, this, _1);
_token = SBufferToken(new SBufferDeleter(deleter));
}
~BufferQueue(void)
{
_token.reset();
- this->clear();
+ while (not this->empty())
+ {
+ this->pop();
+ }
}
void allocate_one(const size_t num_bytes)
diff --git a/lib/gras_impl/input_buffer_queues.hpp b/lib/gras_impl/input_buffer_queues.hpp
index 74fc5ee..5adb06d 100644
--- a/lib/gras_impl/input_buffer_queues.hpp
+++ b/lib/gras_impl/input_buffer_queues.hpp
@@ -179,7 +179,7 @@ GRAS_FORCE_INLINE void InputBufferQueues::init(
if (_history_bytes[i] > old_history)
{
SBuffer buff = _aux_queues[i]->front();
- _aux_queues[i]->pop_front();
+ _aux_queues[i]->pop();
const size_t delta = _history_bytes[i] - old_history;
std::memset(buff.get_actual_memory(), 0, delta);
@@ -246,7 +246,7 @@ GRAS_FORCE_INLINE void InputBufferQueues::__prepare(const size_t i)
else
{
dst = _aux_queues[i]->front();
- _aux_queues[i]->pop_front();
+ _aux_queues[i]->pop();
dst.offset = 0;
dst.length = 0;
_in_aux_buff[i] = true;