summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoernchen <la@tfc-server.de>2014-11-07 19:54:48 +0100
committerHoernchen <la@tfc-server.de>2014-11-07 19:54:48 +0100
commit372a35e22911e3c2b6dd487f88d3d9778731e868 (patch)
tree14ed0d57d275eeb28b25a99b780e43e780b3ad5c
parent4dfb9844318374e0d22e543d3dfe1d67182b0d33 (diff)
msvc fix
-rw-r--r--sdrbase/dsp/samplefifo.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/sdrbase/dsp/samplefifo.cpp b/sdrbase/dsp/samplefifo.cpp
index e9d29b8..db1db83 100644
--- a/sdrbase/dsp/samplefifo.cpp
+++ b/sdrbase/dsp/samplefifo.cpp
@@ -69,8 +69,6 @@ bool SampleFifo::setSize(int size)
uint SampleFifo::write(const quint8* data, uint count)
{
- return write(SampleVector::const_iterator((Sample*)data), SampleVector::const_iterator((Sample*)(data + count)));
-#if 0
QMutexLocker mutexLocker(&m_mutex);
uint total;
uint remaining;
@@ -78,8 +76,6 @@ uint SampleFifo::write(const quint8* data, uint count)
const Sample* begin = (const Sample*)data;
count /= sizeof(Sample);
- //qDebug("write pre count %d %u", count, m_fill);
-
total = MIN(count, m_size - m_fill);
if(total < count) {
if(m_suppressed < 0) {
@@ -100,22 +96,17 @@ uint SampleFifo::write(const quint8* data, uint count)
remaining = total;
while(remaining > 0) {
len = MIN(remaining, m_size - m_tail);
- //qDebug("write remaining %u, len %u", remaining, len);
std::copy(begin, begin + len, m_data.begin() + m_tail);
- m_tail += len;
- m_tail %= m_size;
+ m_tail = (m_tail + len) % m_size;
m_fill += len;
begin += len;
remaining -= len;
}
- //qDebug("write post count %d %u [%u;%u]", count, m_fill, m_head, m_tail);
-
if(m_fill > 0)
emit dataReady();
return total;
-#endif
}
uint SampleFifo::write(SampleVector::const_iterator begin, SampleVector::const_iterator end)