kopia lustrzana https://github.com/f4exb/sdrangel
ScopeVis: never use projection cache. Fixes #872
rodzic
fe923a5813
commit
95923e8b8d
|
@ -22,7 +22,7 @@
|
||||||
Projector::Projector(ProjectionType projectionType) :
|
Projector::Projector(ProjectionType projectionType) :
|
||||||
m_projectionType(projectionType),
|
m_projectionType(projectionType),
|
||||||
m_prevArg(0.0f),
|
m_prevArg(0.0f),
|
||||||
m_cache(0),
|
m_cache(nullptr),
|
||||||
m_cacheMaster(true)
|
m_cacheMaster(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -775,7 +775,7 @@ int ScopeVis::processTraces(const std::vector<ComplexVector::const_iterator>& vc
|
||||||
std::vector<GLScopeSettings::TraceData>::iterator itData = m_traces.m_tracesData.begin();
|
std::vector<GLScopeSettings::TraceData>::iterator itData = m_traces.m_tracesData.begin();
|
||||||
std::vector<float *>::iterator itTrace = m_traces.m_traces[m_traces.currentBufferIndex()].begin();
|
std::vector<float *>::iterator itTrace = m_traces.m_traces[m_traces.currentBufferIndex()].begin();
|
||||||
|
|
||||||
for (; itCtl != m_traces.m_tracesControl.end(); ++itCtl, ++itData, ++itTrace)
|
for (unsigned int ti = 0; itCtl != m_traces.m_tracesControl.end(); ++itCtl, ++itData, ++itTrace, ti++)
|
||||||
{
|
{
|
||||||
if (traceBack && ((remainder) > itData->m_traceDelay)) { // before start of trace
|
if (traceBack && ((remainder) > itData->m_traceDelay)) { // before start of trace
|
||||||
continue;
|
continue;
|
||||||
|
@ -880,15 +880,15 @@ int ScopeVis::processTraces(const std::vector<ComplexVector::const_iterator>& vc
|
||||||
= traceCount - shift; // display x
|
= traceCount - shift; // display x
|
||||||
(*itTrace)[2*traceCount + 1] = v; // display y
|
(*itTrace)[2*traceCount + 1] = v; // display y
|
||||||
traceCount++;
|
traceCount++;
|
||||||
}
|
} // process one sample
|
||||||
}
|
} // loop on traces
|
||||||
|
|
||||||
for (unsigned int i = 0; i < vbegin.size(); i++) {
|
for (unsigned int i = 0; i < vbegin.size(); i++) {
|
||||||
++vbegin[i];
|
++vbegin[i];
|
||||||
}
|
}
|
||||||
remainder--;
|
remainder--;
|
||||||
m_nbSamples--;
|
m_nbSamples--;
|
||||||
}
|
} // loop on samples
|
||||||
|
|
||||||
float traceTime = ((float) m_traceSize) / m_sampleRate;
|
float traceTime = ((float) m_traceSize) / m_sampleRate;
|
||||||
|
|
||||||
|
@ -1149,15 +1149,16 @@ void ScopeVis::updateMaxTraceDelay()
|
||||||
itData->m_projectionType = Projector::ProjectionReal;
|
itData->m_projectionType = Projector::ProjectionReal;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (projectorCounts[(int) itData->m_projectionType] > 0)
|
// WTF is this cache ??? Fixes issue in #872
|
||||||
{
|
// if (projectorCounts[(int) itData->m_projectionType] > 0)
|
||||||
allocateCache = true;
|
// {
|
||||||
(*itCtrl)->m_projector.setCacheMaster(false);
|
// allocateCache = true;
|
||||||
}
|
// (*itCtrl)->m_projector.setCacheMaster(false);
|
||||||
else
|
// }
|
||||||
{
|
// else
|
||||||
(*itCtrl)->m_projector.setCacheMaster(true);
|
// {
|
||||||
}
|
// (*itCtrl)->m_projector.setCacheMaster(true);
|
||||||
|
// }
|
||||||
|
|
||||||
projectorCounts[(int) itData->m_projectionType]++;
|
projectorCounts[(int) itData->m_projectionType]++;
|
||||||
}
|
}
|
||||||
|
@ -1169,7 +1170,7 @@ void ScopeVis::updateMaxTraceDelay()
|
||||||
if (allocateCache) {
|
if (allocateCache) {
|
||||||
(*itCtrl)->m_projector.setCache(m_projectorCache);
|
(*itCtrl)->m_projector.setCache(m_projectorCache);
|
||||||
} else {
|
} else {
|
||||||
(*itCtrl)->m_projector.setCache(0);
|
(*itCtrl)->m_projector.setCache(nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue