Mercurial > hg > svgui
changeset 252:8d89f8869cfb
* 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
author | Chris Cannam |
---|---|
date | Fri, 01 Jun 2007 13:56:35 +0000 |
parents | 948a3b05798b |
children | 1b1e6947c124 |
files | layer/SpectrogramLayer.cpp widgets/AudioDial.cpp |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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; }
--- 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();