diff transform/FeatureExtractionPluginTransform.cpp @ 55:ca1e3f5657d5

* Simplify maker names in plugin menu * Make sure derived models have a name (based on the transform) * Don't start deriving a model from a derived model until the derived model is ready * Tidy up completion management in writable wave file model * Make writable models save/reload correctly from session file (i.e. regenerating from the original transform) * Same for dense 3d models -- don't save the data, just the transform details * Add a comment describing the SV file format
author Chris Cannam
date Fri, 13 Oct 2006 12:51:05 +0000
parents 5f9fdca0c7d8
children 963e3187d920
line wrap: on
line diff
--- a/transform/FeatureExtractionPluginTransform.cpp	Thu Oct 12 14:56:28 2006 +0000
+++ b/transform/FeatureExtractionPluginTransform.cpp	Fri Oct 13 12:51:05 2006 +0000
@@ -27,6 +27,7 @@
 #include "data/model/DenseTimeValueModel.h"
 #include "data/model/NoteModel.h"
 #include "data/model/FFTModel.h"
+#include "data/model/WaveFileModel.h"
 
 #include <fftw3.h>
 
@@ -224,6 +225,12 @@
     DenseTimeValueModel *input = getInput();
     if (!input) return;
 
+    while (!input->isReady()) {
+        if (dynamic_cast<WaveFileModel *>(input)) break; // no need to wait
+        std::cerr << "FeatureExtractionPluginTransform::run: Waiting for input model to be ready..." << std::endl;
+        sleep(1);
+    }
+
     if (!m_output) return;
 
     size_t sampleRate = m_input->getSampleRate();