changeset 518:fe134ec37a2a

* fix unsigned overflow causing spectrogram to "disappear" in some resolution and scroll combinations
author Chris Cannam
date Fri, 06 Mar 2009 10:23:30 +0000
parents 1c6439ef99d6
children 43bd47468005
files layer/SpectrogramLayer.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/layer/SpectrogramLayer.cpp	Tue Mar 03 21:48:03 2009 +0000
+++ b/layer/SpectrogramLayer.cpp	Fri Mar 06 10:23:30 2009 +0000
@@ -2173,7 +2173,7 @@
 
 //    std::cerr << "(giving actual minFreq " << minFreq << " and display minFreq " << displayMinFreq << ")" << std::endl;
 
-    size_t increment = getWindowIncrement();
+    int increment = getWindowIncrement();
     
     bool logarithmic = (m_frequencyScale == LogFrequencyScale);
 /*
@@ -2663,6 +2663,10 @@
             
         for (int sx = sx0; sx < sx1; ++sx) {
 
+#ifdef DEBUG_SPECTROGRAM_REPAINT
+//            std::cerr << "sx = " << sx << std::endl;
+#endif
+
             if (sx < 0 || sx >= int(sourceModel->getWidth())) continue;
 
             if (!m_synchronous) {