Mercurial > hg > svgui
changeset 117:782142eaaa84
* towards optimising spectrogram refresh with new file cache
author | Chris Cannam |
---|---|
date | Fri, 07 Jul 2006 11:22:32 +0000 |
parents | 4a6e6aedf632 |
children | 853a7fc542d0 |
files | layer/SpectrogramLayer.cpp |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;