Mercurial > hg > svcore
comparison data/model/FFTModel.h @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | 59e7fe1b1003 |
children | a1cd5abcb38b |
comparison
equal
deleted
inserted
replaced
1037:bf0e5944289b | 1038:cc27f35aa75c |
---|---|
96 } | 96 } |
97 inline bool getValuesAt(int x, float *reals, float *imaginaries, int minbin = 0, int count = 0) { | 97 inline bool getValuesAt(int x, float *reals, float *imaginaries, int minbin = 0, int count = 0) { |
98 return m_server->getValuesAt(x << m_xshift, reals, imaginaries, minbin << m_yshift, count, getYRatio()); | 98 return m_server->getValuesAt(x << m_xshift, reals, imaginaries, minbin << m_yshift, count, getYRatio()); |
99 } | 99 } |
100 | 100 |
101 inline int getFillExtent() const { return m_server->getFillExtent(); } | 101 inline sv_frame_t getFillExtent() const { return m_server->getFillExtent(); } |
102 | 102 |
103 // DenseThreeDimensionalModel and Model methods: | 103 // DenseThreeDimensionalModel and Model methods: |
104 // | 104 // |
105 inline virtual int getWidth() const { | 105 inline virtual int getWidth() const { |
106 return m_server->getWidth() >> m_xshift; | 106 return m_server->getWidth() >> m_xshift; |
118 return const_cast<FFTModel *>(this)->getMagnitudeAt(x, y); | 118 return const_cast<FFTModel *>(this)->getMagnitudeAt(x, y); |
119 } | 119 } |
120 virtual bool isOK() const { | 120 virtual bool isOK() const { |
121 return m_server && m_server->getModel(); | 121 return m_server && m_server->getModel(); |
122 } | 122 } |
123 virtual int getStartFrame() const { | 123 virtual sv_frame_t getStartFrame() const { |
124 return 0; | 124 return 0; |
125 } | 125 } |
126 virtual int getEndFrame() const { | 126 virtual sv_frame_t getEndFrame() const { |
127 return getWidth() * getResolution() + getResolution(); | 127 return sv_frame_t(getWidth()) * getResolution() + getResolution(); |
128 } | 128 } |
129 virtual int getSampleRate() const; | 129 virtual int 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 } |