Mercurial > hg > svcore
comparison data/model/FFTModel.h @ 1599:ce185d4dd408 bqaudiostream
Merge from default branch
author | Chris Cannam |
---|---|
date | Wed, 23 Jan 2019 14:43:43 +0000 |
parents | c01cbe41aeb5 |
children | 0d89abd631ac |
comparison
equal
deleted
inserted
replaced
1598:d2555df635ec | 1599:ce185d4dd408 |
---|---|
58 int fftSize); | 58 int fftSize); |
59 ~FFTModel(); | 59 ~FFTModel(); |
60 | 60 |
61 // DenseThreeDimensionalModel and Model methods: | 61 // DenseThreeDimensionalModel and Model methods: |
62 // | 62 // |
63 virtual int getWidth() const; | 63 int getWidth() const override; |
64 virtual int getHeight() const; | 64 int getHeight() const override; |
65 virtual float getValueAt(int x, int y) const { return getMagnitudeAt(x, y); } | 65 float getValueAt(int x, int y) const override { return getMagnitudeAt(x, y); } |
66 virtual bool isOK() const { return m_model && m_model->isOK(); } | 66 bool isOK() const override { return m_model && m_model->isOK(); } |
67 virtual sv_frame_t getStartFrame() const { return 0; } | 67 sv_frame_t getStartFrame() const override { return 0; } |
68 virtual sv_frame_t getEndFrame() const { | 68 sv_frame_t getEndFrame() const override { |
69 return sv_frame_t(getWidth()) * getResolution() + getResolution(); | 69 return sv_frame_t(getWidth()) * getResolution() + getResolution(); |
70 } | 70 } |
71 virtual sv_samplerate_t getSampleRate() const { | 71 sv_samplerate_t getSampleRate() const override { |
72 return isOK() ? m_model->getSampleRate() : 0; | 72 return isOK() ? m_model->getSampleRate() : 0; |
73 } | 73 } |
74 virtual int getResolution() const { return m_windowIncrement; } | 74 int getResolution() const override { return m_windowIncrement; } |
75 virtual int getYBinCount() const { return getHeight(); } | 75 virtual int getYBinCount() const { return getHeight(); } |
76 virtual float getMinimumLevel() const { return 0.f; } // Can't provide | 76 float getMinimumLevel() const override { return 0.f; } // Can't provide |
77 virtual float getMaximumLevel() const { return 1.f; } // Can't provide | 77 float getMaximumLevel() const override { return 1.f; } // Can't provide |
78 virtual Column getColumn(int x) const; // magnitudes | 78 Column getColumn(int x) const override; // magnitudes |
79 virtual Column getPhases(int x) const; | 79 virtual Column getPhases(int x) const; |
80 virtual QString getBinName(int n) const; | 80 QString getBinName(int n) const override; |
81 virtual bool shouldUseLogValueScale() const { return true; } | 81 bool shouldUseLogValueScale() const override { return true; } |
82 virtual int getCompletion() const { | 82 int getCompletion() const override { |
83 int c = 100; | 83 int c = 100; |
84 if (m_model) { | 84 if (m_model) { |
85 if (m_model->isReady(&c)) return 100; | 85 if (m_model->isReady(&c)) return 100; |
86 } | 86 } |
87 return c; | 87 return c; |
135 * Return locations and estimated stable frequencies of peak bins. | 135 * Return locations and estimated stable frequencies of peak bins. |
136 */ | 136 */ |
137 virtual PeakSet getPeakFrequencies(PeakPickType type, int x, | 137 virtual PeakSet getPeakFrequencies(PeakPickType type, int x, |
138 int ymin = 0, int ymax = 0) const; | 138 int ymin = 0, int ymax = 0) const; |
139 | 139 |
140 QString getTypeName() const { return tr("FFT"); } | 140 QString getTypeName() const override { return tr("FFT"); } |
141 | 141 |
142 public slots: | 142 public slots: |
143 void sourceModelAboutToBeDeleted(); | 143 void sourceModelAboutToBeDeleted(); |
144 | 144 |
145 private: | 145 private: |