Mercurial > hg > svgui
diff 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 |
line wrap: on
line diff
--- a/layer/SpectrogramLayer.h Tue May 02 12:27:41 2006 +0000 +++ b/layer/SpectrogramLayer.h Wed May 03 14:26:26 2006 +0000 @@ -219,7 +219,24 @@ enum { NO_VALUE = 0 }; // colour index for unused pixels + class ColourMap + { + public: + QColor getColour(unsigned char index) const { + return m_colours[index]; + } + + void setColour(unsigned char index, QColor colour) { + m_colours[index] = colour; + } + + private: + QColor m_colours[256]; + }; + + ColourMap m_colourMap; FFTCacheBase *m_cache; + FFTCacheBase *m_writeCache; bool m_cacheInvalid; class CacheFillThread : public QThread @@ -263,6 +280,7 @@ fftw_plan plan, size_t windowSize, size_t windowIncrement, + float *workbuffer, const Window<double> &windower) const;