Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 459:0acf803e2c79
* Cut back on the locking and general workload in
FFTDataServer::getMagnitudes(). This stuff is far too complicated!
author | Chris Cannam |
---|---|
date | Mon, 08 Dec 2008 11:15:13 +0000 |
parents | 4cb5cd9ccac7 |
children | 4f4f943bfdfc |
comparison
equal
deleted
inserted
replaced
458:bd4db63b085e | 459:0acf803e2c79 |
---|---|
2282 } | 2282 } |
2283 mag.sample(value); | 2283 mag.sample(value); |
2284 value *= m_gain; | 2284 value *= m_gain; |
2285 } | 2285 } |
2286 | 2286 |
2287 /* | |
2288 float v2 = value; | |
2289 | |
2290 //!!! | |
2291 value = 0.f; | |
2292 if (m_colourScale == PhaseColourScale) { | |
2293 value = fft->getPhaseAt(s, q); | |
2294 } else if (m_normalizeColumns) { | |
2295 value = fft->getNormalizedMagnitudeAt(s, q); | |
2296 mag.sample(value); | |
2297 value *= m_gain; | |
2298 } else { | |
2299 value = fft->getMagnitudeAt(s, q) / (m_fftSize/2); | |
2300 mag.sample(value); | |
2301 value *= m_gain; | |
2302 } | |
2303 | |
2304 if (value != v2) { | |
2305 std::cout << "old = " << value << " new = " << v2 << " at y = " << q << std::endl; | |
2306 } | |
2307 */ | |
2308 if (interpolate) { | 2287 if (interpolate) { |
2309 | 2288 |
2310 int ypi = y0i; | 2289 int ypi = y0i; |
2311 if (q < maxbin - 1) ypi = int(yval[q + 2 - minbin]); | 2290 if (q < maxbin - 1) ypi = int(yval[q + 2 - minbin]); |
2312 | 2291 |