Mercurial > hg > sonic-visualiser
changeset 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 (2006-11-13) |
parents | e269ae6ed008 |
children | 34dc23246f46 |
files | transform/FeatureExtractionPluginTransform.cpp |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
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); }