Mercurial > hg > sonic-visualiser
diff transform/FeatureExtractionPluginTransform.cpp @ 71:51f34d378a3a
* Somewhat better handling of running out of memory or disc space
author | Chris Cannam |
---|---|
date | Mon, 13 Nov 2006 14:48:57 +0000 |
parents | 963e3187d920 |
children | bedc7517b6e8 |
line wrap: on
line diff
--- a/transform/FeatureExtractionPluginTransform.cpp Fri Nov 10 17:45:26 2006 +0000 +++ b/transform/FeatureExtractionPluginTransform.cpp Mon Nov 13 14:48:57 2006 +0000 @@ -29,6 +29,8 @@ #include "data/model/FFTModel.h" #include "data/model/WaveFileModel.h" +#include <QMessageBox> + #include <fftw3.h> #include <iostream> @@ -259,6 +261,15 @@ m_context.stepSize, m_context.blockSize, false); + if (!model->isOK()) { + QMessageBox::critical + (0, tr("FFT cache failed"), + tr("Failed to create the FFT model for this transform.\n" + "There may be insufficient memory or disc space to continue.")); + delete model; + setCompletion(100); + return; + } model->resume(); fftModels.push_back(model); }