Mercurial > hg > svcore
comparison plugin/transform/FeatureExtractionModelTransformer.cpp @ 387:7aa1de571880
* juggle some files around in order to free audioio, base, and system libraries
from dependency on QtGui
author | Chris Cannam |
---|---|
date | Wed, 12 Mar 2008 17:42:56 +0000 |
parents | 4bb19132da23 |
children |
comparison
equal
deleted
inserted
replaced
386:e6d11871e4c9 | 387:7aa1de571880 |
---|---|
19 #include "plugin/PluginXml.h" | 19 #include "plugin/PluginXml.h" |
20 #include "vamp-sdk/Plugin.h" | 20 #include "vamp-sdk/Plugin.h" |
21 | 21 |
22 #include "data/model/Model.h" | 22 #include "data/model/Model.h" |
23 #include "base/Window.h" | 23 #include "base/Window.h" |
24 #include "base/Exceptions.h" | |
24 #include "data/model/SparseOneDimensionalModel.h" | 25 #include "data/model/SparseOneDimensionalModel.h" |
25 #include "data/model/SparseTimeValueModel.h" | 26 #include "data/model/SparseTimeValueModel.h" |
26 #include "data/model/EditableDenseThreeDimensionalModel.h" | 27 #include "data/model/EditableDenseThreeDimensionalModel.h" |
27 #include "data/model/DenseTimeValueModel.h" | 28 #include "data/model/DenseTimeValueModel.h" |
28 #include "data/model/NoteModel.h" | 29 #include "data/model/NoteModel.h" |
29 #include "data/model/FFTModel.h" | 30 #include "data/model/FFTModel.h" |
30 #include "data/model/WaveFileModel.h" | 31 #include "data/model/WaveFileModel.h" |
31 | 32 |
32 #include "TransformFactory.h" | 33 #include "TransformFactory.h" |
33 | |
34 #include <QMessageBox> | |
35 | 34 |
36 #include <iostream> | 35 #include <iostream> |
37 | 36 |
38 FeatureExtractionModelTransformer::FeatureExtractionModelTransformer(Input in, | 37 FeatureExtractionModelTransformer::FeatureExtractionModelTransformer(Input in, |
39 const Transform &transform) : | 38 const Transform &transform) : |
336 stepSize, | 335 stepSize, |
337 blockSize, | 336 blockSize, |
338 false, | 337 false, |
339 StorageAdviser::PrecisionCritical); | 338 StorageAdviser::PrecisionCritical); |
340 if (!model->isOK()) { | 339 if (!model->isOK()) { |
341 QMessageBox::critical | |
342 (0, tr("FFT cache failed"), | |
343 tr("Failed to create the FFT model for this transform.\n" | |
344 "There may be insufficient memory or disc space to continue.")); | |
345 delete model; | 340 delete model; |
346 setCompletion(100); | 341 setCompletion(100); |
347 return; | 342 //!!! need a better way to handle this -- previously we were using a QMessageBox but that isn't an appropriate thing to do here either |
343 throw AllocationFailed("Failed to create the FFT model for this feature extraction model transformer"); | |
348 } | 344 } |
349 model->resume(); | 345 model->resume(); |
350 fftModels.push_back(model); | 346 fftModels.push_back(model); |
351 } | 347 } |
352 } | 348 } |