Mercurial > hg > svcore
comparison data/model/FFTModel.h @ 1040:a1cd5abcb38b cxx11
Introduce and use a samplerate type
author | Chris Cannam |
---|---|
date | Wed, 04 Mar 2015 12:01:04 +0000 |
parents | cc27f35aa75c |
children | 1a73618b0b67 |
comparison
equal
deleted
inserted
replaced
1039:b14064bd1f97 | 1040:a1cd5abcb38b |
---|---|
124 return 0; | 124 return 0; |
125 } | 125 } |
126 virtual sv_frame_t getEndFrame() const { | 126 virtual sv_frame_t getEndFrame() const { |
127 return sv_frame_t(getWidth()) * getResolution() + getResolution(); | 127 return sv_frame_t(getWidth()) * getResolution() + getResolution(); |
128 } | 128 } |
129 virtual int getSampleRate() const; | 129 virtual sv_samplerate_t getSampleRate() const; |
130 virtual int getResolution() const { | 130 virtual int getResolution() const { |
131 return m_server->getWindowIncrement() << m_xshift; | 131 return m_server->getWindowIncrement() << m_xshift; |
132 } | 132 } |
133 virtual int getYBinCount() const { | 133 virtual int getYBinCount() const { |
134 return getHeight(); | 134 return getHeight(); |
200 | 200 |
201 FFTDataServer *getServer(const DenseTimeValueModel *, | 201 FFTDataServer *getServer(const DenseTimeValueModel *, |
202 int, WindowType, int, int, int, | 202 int, WindowType, int, int, int, |
203 bool, StorageAdviser::Criteria, int); | 203 bool, StorageAdviser::Criteria, int); |
204 | 204 |
205 int getPeakPickWindowSize(PeakPickType type, int sampleRate, | 205 int getPeakPickWindowSize(PeakPickType type, sv_samplerate_t sampleRate, |
206 int bin, float &percentile) const; | 206 int bin, float &percentile) const; |
207 | 207 |
208 int getYRatio() { | 208 int getYRatio() { |
209 int ys = m_yshift; | 209 int ys = m_yshift; |
210 int r = 1; | 210 int r = 1; |
211 while (ys) { --ys; r <<= 1; } | 211 while (ys) { --ys; r <<= 1; } |