comparison layer/SpectrogramLayer.cpp @ 473:4f4f943bfdfc

* Merge from one-fftdataserver-per-fftmodel branch. This bit of reworking (which is not described very accurately by the title of the branch) turns the MatrixFile object into something that either reads or writes, but not both, and separates the FFT file cache reader and writer implementations separately. This allows the FFT data server to have a single thread owning writers and one reader per "customer" thread, and for all locking to be vastly simplified and concentrated in the data server alone (because none of the classes it makes use of is used in more than one thread at a time). The result is faster and more trustworthy code.
author Chris Cannam
date Tue, 27 Jan 2009 13:25:10 +0000
parents 0acf803e2c79
children 92f4d88241b8
comparison
equal deleted inserted replaced
472:13e8edbffbd7 473:4f4f943bfdfc
2213 #endif 2213 #endif
2214 runOutOfData = true; 2214 runOutOfData = true;
2215 break; 2215 break;
2216 } 2216 }
2217 } 2217 }
2218 2218 /*!!!
2219 if (!fftSuspended) { 2219 if (!fftSuspended) {
2220 fft->suspendWrites(); 2220 fft->suspendWrites();
2221 fftSuspended = true; 2221 fftSuspended = true;
2222 } 2222 }
2223 2223 */
2224 Profiler innerprof2("SpectrogramLayer::paint: 1 data column"); 2224 Profiler innerprof2("SpectrogramLayer::paint: 1 data column");
2225 2225
2226 MagnitudeRange mag; 2226 MagnitudeRange mag;
2227 2227
2228 if (m_binDisplay == PeakFrequencies) { 2228 if (m_binDisplay == PeakFrequencies) {
2485 m_lastPaintBlockWidth = paintBlockWidth; 2485 m_lastPaintBlockWidth = paintBlockWidth;
2486 (void)gettimeofday(&tv, 0); 2486 (void)gettimeofday(&tv, 0);
2487 m_lastPaintTime = RealTime::fromTimeval(tv) - mainPaintStart; 2487 m_lastPaintTime = RealTime::fromTimeval(tv) - mainPaintStart;
2488 } 2488 }
2489 2489
2490 if (fftSuspended) fft->resume(); 2490 //!!! if (fftSuspended) fft->resume();
2491 } 2491 }
2492 2492
2493 void 2493 void
2494 SpectrogramLayer::illuminateLocalFeatures(View *v, QPainter &paint) const 2494 SpectrogramLayer::illuminateLocalFeatures(View *v, QPainter &paint) const
2495 { 2495 {