# HG changeset patch # User Chris Cannam # Date 1194961867 0 # Node ID 37847fc0b38118abde3591c294f2eab44a11e86b # Parent 9e396b8d7dfc9c6c0fc6812e254ad9657cb4f6a4 * Save and restore FFTW plans diff -r 9e396b8d7dfc -r 37847fc0b381 main/main.cpp --- a/main/main.cpp Fri Nov 09 17:46:58 2007 +0000 +++ b/main/main.cpp Tue Nov 13 13:51:07 2007 +0000 @@ -36,6 +36,10 @@ #include #include +#ifdef HAVE_FFTW3F +#include +#endif + /*! \mainpage Sonic Visualiser \section interesting Summary of interesting classes @@ -338,6 +342,14 @@ } } +#ifdef HAVE_FFTW3F + settings.beginGroup("FFTWisdom"); + QString wisdom = settings.value("wisdom").toString(); + if (wisdom != "") { + fftwf_import_wisdom_from_string(wisdom.toLocal8Bit().data()); + } + settings.endGroup(); +#endif /* @@ -353,5 +365,15 @@ TempDirectory::getInstance()->cleanup(); application.releaseMainWindow(); +#ifdef HAVE_FFTW3F + char *cwisdom = fftwf_export_wisdom_to_string(); + if (cwisdom) { + settings.beginGroup("FFTWisdom"); + settings.setValue("wisdom", cwisdom); + settings.endGroup(); + fftwf_free(cwisdom); + } +#endif + return rv; }