# HG changeset patch # User Chris Cannam # Date 1180706195 0 # Node ID 8d89f8869cfb84a5b028ffdfa8a6930478a8c047 # Parent 948a3b05798b733e6dd27c30fd3fea423d6292d9 * don't store fft values scaled by fftsize/2; that's a special requirement for the spectrogram, and other applications will not expect it -- make the spectrogram do that scaling itself * add a higher-resolution memory cache (still polar, though) as an alternative to the 16-bit compact cache * don't use the memory cache if we want rectangular coords (unless the disc cache is totally infeasible) as conversion slows it down anyway * avoid redundant rectangular -> polar -> rectangular conversion when storing values in a rectangular-mode disc cache diff -r 948a3b05798b -r 8d89f8869cfb layer/SpectrogramLayer.cpp --- a/layer/SpectrogramLayer.cpp Fri May 18 16:47:38 2007 +0000 +++ b/layer/SpectrogramLayer.cpp Fri Jun 01 13:56:35 2007 +0000 @@ -1477,7 +1477,7 @@ if (!have || value < phaseMin) { phaseMin = value; } if (!have || value > phaseMax) { phaseMax = value; } - value = fft->getMagnitudeAt(s, q); + value = fft->getMagnitudeAt(s, q) / (m_fftSize/2); if (!have || value < min) { min = value; } if (!have || value > max) { max = value; } @@ -2140,7 +2140,7 @@ mag.sample(value); value *= m_gain; } else { - value = fft->getMagnitudeAt(s, q); + value = fft->getMagnitudeAt(s, q) / (m_fftSize/2); mag.sample(value); value *= m_gain; } diff -r 948a3b05798b -r 8d89f8869cfb widgets/AudioDial.cpp --- a/widgets/AudioDial.cpp Fri May 18 16:47:38 2007 +0000 +++ b/widgets/AudioDial.cpp Fri Jun 01 13:56:35 2007 +0000 @@ -376,7 +376,7 @@ float AudioDial::mappedValue() const { if (m_rangeMapper) { - std::cerr << "AudioDial::mappedValue(): value = " << value() << ", mappedValue = " << m_mappedValue << std::endl; +// std::cerr << "AudioDial::mappedValue(): value = " << value() << ", mappedValue = " << m_mappedValue << std::endl; return m_mappedValue; } return value();