comparison layer/SpectrumLayer.h @ 1382:2df1af7ac752 spectrogramparam

Add oversampling option to spectrum as well
author Chris Cannam
date Wed, 07 Nov 2018 11:37:51 +0000
parents d79e21855aef
children 86f319dd6ab9
comparison
equal deleted inserted replaced
1381:2f4476993ae6 1382:2df1af7ac752
88 int getWindowSize() const { return m_windowSize; } 88 int getWindowSize() const { return m_windowSize; }
89 89
90 void setWindowHopLevel(int level); 90 void setWindowHopLevel(int level);
91 int getWindowHopLevel() const { return m_windowHopLevel; } 91 int getWindowHopLevel() const { return m_windowHopLevel; }
92 92
93 void setOversampling(int oversampling);
94 int getOversampling() const;
95
96 int getFFTSize() const { return getWindowSize() * getOversampling(); }
97
93 void setWindowType(WindowType type); 98 void setWindowType(WindowType type);
94 WindowType getWindowType() const { return m_windowType; } 99 WindowType getWindowType() const { return m_windowType; }
95 100
96 void setShowPeaks(bool); 101 void setShowPeaks(bool);
97 bool getShowPeaks() const { return m_showPeaks; } 102 bool getShowPeaks() const { return m_showPeaks; }
98 103
99 virtual void toXml(QTextStream &stream, QString indent = "", 104 virtual void toXml(QTextStream &stream, QString indent = "",
100 QString extraAttributes = "") const override; 105 QString extraAttributes = "") const override;
112 int m_channel; 117 int m_channel;
113 bool m_channelSet; 118 bool m_channelSet;
114 int m_windowSize; 119 int m_windowSize;
115 WindowType m_windowType; 120 WindowType m_windowType;
116 int m_windowHopLevel; 121 int m_windowHopLevel;
122 int m_oversampling;
117 bool m_showPeaks; 123 bool m_showPeaks;
118 mutable bool m_newFFTNeeded; 124 mutable bool m_newFFTNeeded;
119 125
120 mutable QMutex m_fftMutex; 126 mutable QMutex m_fftMutex;
121 127