aboutsummaryrefslogtreecommitdiffstats
path: root/src/SampleQueue.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-07 13:41:20 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-07 13:41:20 +0100
commit26ebea0262f0664c4cd90664da52f4d9f6a9c8bc (patch)
treecd0c874ba1395b4ae7b003f4b48a231383f1080f /src/SampleQueue.h
parent5e9fe473ba528f336dd86ce9d3d7d3e40410db54 (diff)
downloadODR-AudioEnc-26ebea0262f0664c4cd90664da52f4d9f6a9c8bc.tar.gz
ODR-AudioEnc-26ebea0262f0664c4cd90664da52f4d9f6a9c8bc.tar.bz2
ODR-AudioEnc-26ebea0262f0664c4cd90664da52f4d9f6a9c8bc.zip
alsa input improvements, not working
Diffstat (limited to 'src/SampleQueue.h')
-rw-r--r--src/SampleQueue.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/SampleQueue.h b/src/SampleQueue.h
index d00b8f9..eabc301 100644
--- a/src/SampleQueue.h
+++ b/src/SampleQueue.h
@@ -12,6 +12,8 @@
#include <boost/thread.hpp>
#include <queue>
+#include <stdio.h>
+
/* This queue is meant to be used by two threads. One producer
* that pushes elements into the queue, and one consumer that
* retrieves the elements.
@@ -37,6 +39,9 @@ public:
boost::mutex::scoped_lock lock(m_mutex);
if (m_queue.size() >= m_max_size) {
+ /*fprintf(stderr, "######## push overrun %zu, %zu\n",
+ len,
+ m_queue.size()); // */
return 0;
}
@@ -65,6 +70,9 @@ public:
size_t pop(T* buf, size_t len)
{
boost::mutex::scoped_lock lock(m_mutex);
+ fprintf(stderr, "######## pop %zu (%zu)\n",
+ len,
+ m_queue.size());
size_t ret = 0;