diff data/fft/FFTDataServer.cpp @ 157:c03ec31005e1

* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and vertical depending on layer type (supported for waveform and spectrogram, though wrong for log-scale spectrogram at the moment). * Add bare bones of a spectrum layer. * Add window icon * Add shortcut for "insert time instant" on laptops without keypad enter (";") * Delete FFT processing thread when it exits (at least, next time we're asked for something interesting) * Get audio file extensions from the file readers, and thus from libsndfile for the wave file reader -- leads to rather a wide combo box in file dialog though * Better refresh order for spectrogram (redraw centre section first)
author Chris Cannam
date Fri, 04 Aug 2006 17:01:37 +0000
parents ae9be6b6b522
children e5879045d22b
line wrap: on
line diff
--- a/data/fft/FFTDataServer.cpp	Thu Aug 03 16:04:00 2006 +0000
+++ b/data/fft/FFTDataServer.cpp	Fri Aug 04 17:01:37 2006 +0000
@@ -359,8 +359,6 @@
     }
 
     m_fillThread = new FillThread(*this, fillFromColumn);
-
-    //!!! respond appropriately when thread exits (deleteProcessingData etc)
 }
 
 FFTDataServer::~FFTDataServer()
@@ -427,7 +425,15 @@
     std::cerr << "FFTDataServer(" << this << "): resume" << std::endl;
 #endif
     m_suspended = false;
-    m_condition.wakeAll();
+    if (m_fillThread) {
+        if (m_fillThread->isFinished()) {
+            delete m_fillThread;
+            m_fillThread = 0;
+            deleteProcessingData();
+        } else {
+            m_condition.wakeAll();
+        }
+    }
 }
 
 FFTCache *