summaryrefslogtreecommitdiff
path: root/lib/gras_impl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gras_impl')
-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;