comparison data/fft/FFTDataServer.h @ 408:115f60df1e4d

* Speed up spectrogram painting by releasing mutex in FFTDataServer while calculating data prior to writing it, and by adding whole-column value query methods to FFT objects * Add paint cache to Thumbwheel -- repaints of this widget were slowing down the whole spectrogram repaint * More uses of MutexLocker (named and with debug) and more profile points * Make startup much quicker some of the time, with OSC server in place
author Chris Cannam
date Thu, 08 May 2008 14:46:22 +0000
parents 824ee993ca8d
children 3cc4b7cd2aa5
comparison
equal deleted inserted replaced
407:88ad01799040 408:115f60df1e4d
79 float getMaximumMagnitudeAt(size_t x); 79 float getMaximumMagnitudeAt(size_t x);
80 float getPhaseAt(size_t x, size_t y); 80 float getPhaseAt(size_t x, size_t y);
81 void getValuesAt(size_t x, size_t y, float &real, float &imaginary); 81 void getValuesAt(size_t x, size_t y, float &real, float &imaginary);
82 bool isColumnReady(size_t x); 82 bool isColumnReady(size_t x);
83 83
84 bool getMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0, size_t step = 1);
85 bool getNormalizedMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0, size_t step = 1);
86 bool getPhasesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0, size_t step = 1);
87
84 void suspend(); 88 void suspend();
85 void suspendWrites(); 89 void suspendWrites();
86 void resume(); // also happens automatically if new data needed 90 void resume(); // also happens automatically if new data needed
87 91
88 // Convenience functions: 92 // Convenience functions:
192 bool m_exiting; 196 bool m_exiting;
193 bool m_suspended; 197 bool m_suspended;
194 FillThread *m_fillThread; 198 FillThread *m_fillThread;
195 199
196 void deleteProcessingData(); 200 void deleteProcessingData();
197 void fillColumn(size_t x); 201 void fillColumn(size_t x, bool lockHeld);
198 202
199 QString generateFileBasename() const; 203 QString generateFileBasename() const;
200 static QString generateFileBasename(const DenseTimeValueModel *model, 204 static QString generateFileBasename(const DenseTimeValueModel *model,
201 int channel, 205 int channel,
202 WindowType windowType, 206 WindowType windowType,