Mercurial > hg > svgui
diff layer/SpectrumLayer.h @ 1403:10e768adaee5
Retain consistent min freq (rather than min bin no) when changing fft parameters in spectrum; scale ffts by window size rather than fft size in case of oversampling, to avoid fading out because of scale factor including zero padding
author | Chris Cannam |
---|---|
date | Thu, 15 Nov 2018 15:08:08 +0000 |
parents | 900bed394f5a |
children | a18e78b9c78b |
line wrap: on
line diff
--- a/layer/SpectrumLayer.h Thu Nov 15 14:18:26 2018 +0000 +++ b/layer/SpectrumLayer.h Thu Nov 15 15:08:08 2018 +0000 @@ -68,6 +68,8 @@ virtual void setProperty(const PropertyName &, int value) override; virtual void setProperties(const QXmlAttributes &) override; + virtual bool setDisplayExtents(double min, double max) override; + virtual bool getXScaleValue(const LayerGeometryProvider *v, int x, double &value, QString &unit) const override; @@ -123,6 +125,10 @@ bool m_showPeaks; mutable bool m_newFFTNeeded; + double m_freqOfMinBin; // used to ensure accurate + // alignment when changing + // fft size + mutable QMutex m_fftMutex; void setupFFT();