# HG changeset patch # User Chris Cannam # Date 1202319653 0 # Node ID 7cc6b7b0d8193b256ab9d8d85c792cb58dc0abda # Parent 0a44caddd9fea42f63af251ea12a02d7ee0356a1 * line up overview widget nicely with main pane (at least on first startup) * fix #1878396 renaming layer seems to have no visible effect * comment out some debug output diff -r 0a44caddd9fe -r 7cc6b7b0d819 base/StorageAdviser.cpp --- a/base/StorageAdviser.cpp Wed Feb 06 16:21:29 2008 +0000 +++ b/base/StorageAdviser.cpp Wed Feb 06 17:40:53 2008 +0000 @@ -22,6 +22,8 @@ #include +//#define DEBUG_STORAGE_ADVISER 1 + long StorageAdviser::m_discPlanned = 0; long StorageAdviser::m_memoryPlanned = 0; @@ -30,9 +32,11 @@ int minimumSize, int maximumSize) { +#ifdef DEBUG_STORAGE_ADVISER std::cerr << "StorageAdviser::recommend: Criteria " << criteria << ", minimumSize " << minimumSize << ", maximumSize " << maximumSize << std::endl; +#endif QString path = TempDirectory::getInstance()->getPath(); int discFree = GetDiscSpaceMBAvailable(path.toLocal8Bit()); @@ -51,7 +55,9 @@ memoryFree = 0; } +#ifdef DEBUG_STORAGE_ADVISER std::cerr << "Disc space: " << discFree << ", memory free: " << memoryFree << ", memory total: " << memoryTotal << ", min " << minimumSize << ", max " << maximumSize << std::endl; +#endif //!!! We have a potentially serious problem here if multiple //recommendations are made in advance of any of the resulting @@ -86,8 +92,10 @@ else if (minmb > (discFree / 10)) discStatus = Marginal; else discStatus = Sufficient; +#ifdef DEBUG_STORAGE_ADVISER std::cerr << "Memory status: " << memoryStatus << ", disc status " << discStatus << std::endl; +#endif int recommendation = NoRecommendation; diff -r 0a44caddd9fe -r 7cc6b7b0d819 data/fft/FFTDataServer.cpp --- a/data/fft/FFTDataServer.cpp Wed Feb 06 16:21:29 2008 +0000 +++ b/data/fft/FFTDataServer.cpp Wed Feb 06 17:40:53 2008 +0000 @@ -727,9 +727,9 @@ compactCache = canCompact && (recommendation & StorageAdviser::ConserveSpace); +#ifdef DEBUG_FFT_SERVER std::cerr << "FFTDataServer: memory cache = " << memoryCache << ", compact cache = " << compactCache << std::endl; -#ifdef DEBUG_FFT_SERVER std::cerr << "Width " << w << " of " << m_width << ", height " << h << ", size " << w * h << std::endl; #endif } diff -r 0a44caddd9fe -r 7cc6b7b0d819 data/fft/FFTFileCache.cpp --- a/data/fft/FFTFileCache.cpp Wed Feb 06 16:21:29 2008 +0000 +++ b/data/fft/FFTFileCache.cpp Wed Feb 06 17:40:53 2008 +0000 @@ -23,6 +23,7 @@ #include + // The underlying matrix has height (m_height * 2 + 1). In each // column we store magnitude at [0], [2] etc and phase at [1], [3] // etc, and then store the normalization factor (maximum magnitude) at diff -r 0a44caddd9fe -r 7cc6b7b0d819 data/fft/FFTMemoryCache.cpp --- a/data/fft/FFTMemoryCache.cpp Wed Feb 06 16:21:29 2008 +0000 +++ b/data/fft/FFTMemoryCache.cpp Wed Feb 06 17:40:53 2008 +0000 @@ -18,6 +18,8 @@ #include +//#define DEBUG_FFT_MEMORY_CACHE 1 + FFTMemoryCache::FFTMemoryCache(StorageType storageType) : m_width(0), m_height(0), @@ -30,13 +32,17 @@ m_factor(0), m_storageType(storageType) { +#ifdef DEBUG_FFT_MEMORY_CACHE std::cerr << "FFTMemoryCache[" << this << "]::FFTMemoryCache (type " << m_storageType << ")" << std::endl; +#endif } FFTMemoryCache::~FFTMemoryCache() { -// std::cerr << "FFTMemoryCache[" << this << "]::~FFTMemoryCache" << std::endl; +#ifdef DEBUG_FFT_MEMORY_CACHE + std::cerr << "FFTMemoryCache[" << this << "]::~FFTMemoryCache" << std::endl; +#endif for (size_t i = 0; i < m_width; ++i) { if (m_magnitude && m_magnitude[i]) free(m_magnitude[i]); @@ -59,7 +65,9 @@ void FFTMemoryCache::resize(size_t width, size_t height) { +#ifdef DEBUG_FFT_MEMORY_CACHE std::cerr << "FFTMemoryCache[" << this << "]::resize(" << width << "x" << height << " = " << width*height << ")" << std::endl; +#endif if (m_width == width && m_height == height) return; @@ -81,7 +89,9 @@ m_width = width; m_height = height; -// std::cerr << "done, width = " << m_width << " height = " << m_height << std::endl; +#ifdef DEBUG_FFT_MEMORY_CACHE + std::cerr << "done, width = " << m_width << " height = " << m_height << std::endl; +#endif } void