diff --git a/sdrbase/dsp/scopevis.cpp b/sdrbase/dsp/scopevis.cpp index d673661a5..c368a2a58 100644 --- a/sdrbase/dsp/scopevis.cpp +++ b/sdrbase/dsp/scopevis.cpp @@ -303,14 +303,16 @@ void ScopeVis::processMemoryTrace() traceMemoryIndex += GLScopeSettings::m_nbTraceMemories; } - SampleVector::const_iterator mend; + std::vector mend; m_traceDiscreteMemory.getEndPointAt(traceMemoryIndex, mend); - SampleVector::const_iterator mbegin = mend - m_traceSize; - SampleVector::const_iterator mbegin_tb = mbegin - m_maxTraceDelay; + std::vector mbegin(mend.size()); + TraceBackDiscreteMemory::moveIt(mend, mbegin, -m_traceSize); + std::vector mbegin_tb(mbegin.size()); + TraceBackDiscreteMemory::moveIt(mbegin, mbegin_tb, -m_maxTraceDelay); m_nbSamples = m_traceSize + m_maxTraceDelay; - processTraces(mbegin_tb, m_maxTraceDelay, true); // traceback - processTraces(mbegin, m_traceSize, false); + processTraces(mbegin_tb[0], m_maxTraceDelay, true); // traceback + processTraces(mbegin[0], m_traceSize, false); } } diff --git a/sdrbase/dsp/scopevis.h b/sdrbase/dsp/scopevis.h index ecff49270..cc06aa420 100644 --- a/sdrbase/dsp/scopevis.h +++ b/sdrbase/dsp/scopevis.h @@ -835,7 +835,7 @@ private: /** * Move buffer iterator by a certain amount (first stream) */ - static void moveIt(const SampleVector::iterator& x, SampleVector::iterator& y, int amount) { + static void moveIt(const SampleVector::const_iterator& x, SampleVector::const_iterator& y, int amount) { y = x + amount; }