# HG changeset patch # User Chris Cannam # Date 1152271352 0 # Node ID 782142eaaa845fac9e1f937946ab5f5a03a50563 # Parent 4a6e6aedf632ad40ff92a99a363039318daba33d * towards optimising spectrogram refresh with new file cache diff -r 4a6e6aedf632 -r 782142eaaa84 layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Thu Jul 06 15:54:33 2006 +0000 +++ b/layer/SpectrogramLayer.cpp Fri Jul 07 11:22:32 2006 +0000 @@ -1285,6 +1285,8 @@ for (int s = s0i; s <= s1i; ++s) { + if (!fft->isColumnReady(s)) continue; + float binfreq = (sr * q) / m_windowSize; if (q == q0i) freqMin = binfreq; if (q == q1i) freqMax = binfreq; @@ -1356,6 +1358,8 @@ for (int q = q0i; q <= q1i; ++q) { for (int s = s0i; s <= s1i; ++s) { if (s >= 0 && q >= 0 && s < cw && q < ch) { + + if (!fft->isColumnReady(s)) continue; float value; @@ -1472,7 +1476,7 @@ v->setLightBackground(false); } -// Profiler profiler("SpectrogramLayer::paint", true); + Profiler profiler("SpectrogramLayer::paint", true); #ifdef DEBUG_SPECTROGRAM_REPAINT std::cerr << "SpectrogramLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << ", m_updateTimer " << m_updateTimer << std::endl;