diff data/fft/FFTDataServer.h @ 154:6ec58bb8f729

* Suspend/resume fft data server write activity while reading from a server to repaint the spectrogram display. Makes a significant improvement to the otherwise dreadful responsiveness of spectrogram display.
author Chris Cannam
date Thu, 03 Aug 2006 12:42:15 +0000
parents 21792a550ec9
children ae9be6b6b522
line wrap: on
line diff
--- a/data/fft/FFTDataServer.h	Wed Aug 02 16:42:17 2006 +0000
+++ b/data/fft/FFTDataServer.h	Thu Aug 03 12:42:15 2006 +0000
@@ -74,6 +74,7 @@
     bool       isColumnReady(size_t x);
 
     void       suspend();
+    void       resume(); // also happens automatically if new data needed
 
     // Convenience functions:
 
@@ -131,7 +132,6 @@
 
     int m_lastUsedCache;
     FFTCache *getCache(size_t x, size_t &col) {
-        if (m_suspended) resume();
         col   = x % m_cacheWidth;
         int c = x / m_cacheWidth;
         // The only use of m_lastUsedCache without a lock is to
@@ -179,7 +179,6 @@
 
     void deleteProcessingData();
     void fillColumn(size_t x);
-    void resume();
 
     QString generateFileBasename() const;
     static QString generateFileBasename(const DenseTimeValueModel *model,