Mercurial > hg > svgui
comparison layer/SpectrogramLayer.h @ 86:93a7efc75fb7
* Switch spectrogram layer over to using the new rudimentary disk-backed
FFT cache
author | Chris Cannam |
---|---|
date | Wed, 03 May 2006 14:26:26 +0000 |
parents | d31c4f5230d7 |
children | 4b98bda7e94d |
comparison
equal
deleted
inserted
replaced
85:d31c4f5230d7 | 86:93a7efc75fb7 |
---|---|
217 BinDisplay m_binDisplay; | 217 BinDisplay m_binDisplay; |
218 bool m_normalizeColumns; | 218 bool m_normalizeColumns; |
219 | 219 |
220 enum { NO_VALUE = 0 }; // colour index for unused pixels | 220 enum { NO_VALUE = 0 }; // colour index for unused pixels |
221 | 221 |
222 class ColourMap | |
223 { | |
224 public: | |
225 QColor getColour(unsigned char index) const { | |
226 return m_colours[index]; | |
227 } | |
228 | |
229 void setColour(unsigned char index, QColor colour) { | |
230 m_colours[index] = colour; | |
231 } | |
232 | |
233 private: | |
234 QColor m_colours[256]; | |
235 }; | |
236 | |
237 ColourMap m_colourMap; | |
222 FFTCacheBase *m_cache; | 238 FFTCacheBase *m_cache; |
239 FFTCacheBase *m_writeCache; | |
223 bool m_cacheInvalid; | 240 bool m_cacheInvalid; |
224 | 241 |
225 class CacheFillThread : public QThread | 242 class CacheFillThread : public QThread |
226 { | 243 { |
227 public: | 244 public: |
261 double *inputBuffer, | 278 double *inputBuffer, |
262 fftw_complex *outputBuffer, | 279 fftw_complex *outputBuffer, |
263 fftw_plan plan, | 280 fftw_plan plan, |
264 size_t windowSize, | 281 size_t windowSize, |
265 size_t windowIncrement, | 282 size_t windowIncrement, |
283 float *workbuffer, | |
266 const Window<double> &windower) | 284 const Window<double> &windower) |
267 const; | 285 const; |
268 | 286 |
269 static float calculateFrequency(size_t bin, | 287 static float calculateFrequency(size_t bin, |
270 size_t windowSize, | 288 size_t windowSize, |