# HG changeset patch # User Chris Cannam # Date 1195477357 0 # Node ID 79ea249689d9eda93ecd9a9a3fbfcd874feff0a2 # Parent 9e396b8d7dfc9c6c0fc6812e254ad9657cb4f6a4 * Merge fix from spectrogram-cache-rejig branch: save/restore FFTW wisdom diff -r 9e396b8d7dfc -r 79ea249689d9 main/main.cpp --- a/main/main.cpp Fri Nov 09 17:46:58 2007 +0000 +++ b/main/main.cpp Mon Nov 19 13:02:37 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; }