changeset 169:86cee2b060c7

* Fix slowness in serving FFT values to feature extraction plugin transform (failure to call resume() on FFT model) * Fix failure to update completion from time/value model
author Chris Cannam
date Tue, 17 Oct 2006 13:49:31 +0000
parents d4be66d61c04
children bdba24db0446
files layer/SpectrogramLayer.cpp layer/TimeValueLayer.h view/View.cpp
diffstat 3 files changed, 14 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/layer/SpectrogramLayer.cpp	Tue Oct 17 13:04:49 2006 +0000
+++ b/layer/SpectrogramLayer.cpp	Tue Oct 17 13:49:31 2006 +0000
@@ -1583,16 +1583,19 @@
     }
 
     if (m_fftModels.find(v) == m_fftModels.end()) {
-        m_fftModels[v] = FFTFillPair
-            (new FFTModel(m_model,
-                          m_channel,
-                          m_windowType,
-                          m_windowSize,
-                          getWindowIncrement(),
-                          fftSize,
-                          true,
-                          m_candidateFillStartFrame),
-             0);
+
+        FFTModel *model = new FFTModel(m_model,
+                                       m_channel,
+                                       m_windowType,
+                                       m_windowSize,
+                                       getWindowIncrement(),
+                                       fftSize,
+                                       true,
+                                       m_candidateFillStartFrame);
+
+        m_fftModels[v] = FFTFillPair(model, 0);
+
+        model->resume();
         
         delete m_updateTimer;
         m_updateTimer = new QTimer((SpectrogramLayer *)this);
--- a/layer/TimeValueLayer.h	Tue Oct 17 13:04:49 2006 +0000
+++ b/layer/TimeValueLayer.h	Tue Oct 17 13:49:31 2006 +0000
@@ -102,7 +102,7 @@
 
     virtual bool isLayerEditable() const { return true; }
 
-    virtual int getCompletion() const { return m_model->getCompletion(); }
+    virtual int getCompletion(View *) const { return m_model->getCompletion(); }
 
     virtual bool needsTextLabelHeight() const {
         return m_plotStyle == PlotSegmentation && m_model->hasTextLabels();
--- a/view/View.cpp	Tue Oct 17 13:04:49 2006 +0000
+++ b/view/View.cpp	Tue Oct 17 13:49:31 2006 +0000
@@ -1087,8 +1087,6 @@
 
 		i->second->setText(i->first->getPropertyContainerName());
 
-//                std::cerr << this << "::checkProgress: completion " << completion << std::endl;
-
 		i->second->setValue(completion);
 		i->second->move(0, ph - i->second->height());