comparison 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
comparison
equal deleted inserted replaced
54:ec77936c268e 55:ca1e3f5657d5
25 #include "data/model/SparseTimeValueModel.h" 25 #include "data/model/SparseTimeValueModel.h"
26 #include "data/model/EditableDenseThreeDimensionalModel.h" 26 #include "data/model/EditableDenseThreeDimensionalModel.h"
27 #include "data/model/DenseTimeValueModel.h" 27 #include "data/model/DenseTimeValueModel.h"
28 #include "data/model/NoteModel.h" 28 #include "data/model/NoteModel.h"
29 #include "data/model/FFTModel.h" 29 #include "data/model/FFTModel.h"
30 #include "data/model/WaveFileModel.h"
30 31
31 #include <fftw3.h> 32 #include <fftw3.h>
32 33
33 #include <iostream> 34 #include <iostream>
34 35
221 void 222 void
222 FeatureExtractionPluginTransform::run() 223 FeatureExtractionPluginTransform::run()
223 { 224 {
224 DenseTimeValueModel *input = getInput(); 225 DenseTimeValueModel *input = getInput();
225 if (!input) return; 226 if (!input) return;
227
228 while (!input->isReady()) {
229 if (dynamic_cast<WaveFileModel *>(input)) break; // no need to wait
230 std::cerr << "FeatureExtractionPluginTransform::run: Waiting for input model to be ready..." << std::endl;
231 sleep(1);
232 }
226 233
227 if (!m_output) return; 234 if (!m_output) return;
228 235
229 size_t sampleRate = m_input->getSampleRate(); 236 size_t sampleRate = m_input->getSampleRate();
230 237