comparison data/model/FFTModel.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 7aa1de571880
children 1405f4a2caf3
comparison
equal deleted inserted replaced
407:88ad01799040 408:115f60df1e4d
83 } 83 }
84 bool isColumnAvailable(size_t x) const { 84 bool isColumnAvailable(size_t x) const {
85 return m_server->isColumnReady(x << m_xshift); 85 return m_server->isColumnReady(x << m_xshift);
86 } 86 }
87 87
88 float getMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
89 return m_server->getMagnitudesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio());
90 }
91 float getNormalizedMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
92 return m_server->getNormalizedMagnitudesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio());
93 }
94 float getPhasesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) {
95 return m_server->getPhasesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio());
96 }
97
88 size_t getFillExtent() const { return m_server->getFillExtent(); } 98 size_t getFillExtent() const { return m_server->getFillExtent(); }
89 99
90 // DenseThreeDimensionalModel and Model methods: 100 // DenseThreeDimensionalModel and Model methods:
91 // 101 //
92 virtual size_t getWidth() const { 102 virtual size_t getWidth() const {
184 int, WindowType, size_t, size_t, size_t, 194 int, WindowType, size_t, size_t, size_t,
185 bool, StorageAdviser::Criteria, size_t); 195 bool, StorageAdviser::Criteria, size_t);
186 196
187 size_t getPeakPickWindowSize(PeakPickType type, size_t sampleRate, 197 size_t getPeakPickWindowSize(PeakPickType type, size_t sampleRate,
188 size_t bin, float &percentile) const; 198 size_t bin, float &percentile) const;
199
200 size_t getYRatio() {
201 size_t ys = m_yshift;
202 size_t r = 1;
203 while (ys) { --ys; r <<= 1; }
204 return r;
205 }
189 }; 206 };
190 207
191 #endif 208 #endif