Mercurial > hg > svcore
diff data/model/FFTModel.h @ 497:b6dc6c7f402c
Various fixes:
* Fix handling of HTTP redirects (avoiding crashes... I hope)
* Fix failure to delete FFT models when a feature extraction model
transformer was abandoned (also a cause of crashes in the past)
* Fix deadlock when said transform was abandoned before its source
model was ready because the session was being cleared (and so the
source model would never be ready)
author | Chris Cannam |
---|---|
date | Fri, 28 Nov 2008 13:36:13 +0000 |
parents | 1405f4a2caf3 |
children | 55ad231c9db7 |
line wrap: on
line diff
--- a/data/model/FFTModel.h Thu Nov 27 22:09:58 2008 +0000 +++ b/data/model/FFTModel.h Fri Nov 28 13:36:13 2008 +0000 @@ -66,43 +66,43 @@ size_t fillFromColumn = 0); ~FFTModel(); - float getMagnitudeAt(size_t x, size_t y) { + inline float getMagnitudeAt(size_t x, size_t y) { return m_server->getMagnitudeAt(x << m_xshift, y << m_yshift); } - float getNormalizedMagnitudeAt(size_t x, size_t y) { + inline float getNormalizedMagnitudeAt(size_t x, size_t y) { return m_server->getNormalizedMagnitudeAt(x << m_xshift, y << m_yshift); } - float getMaximumMagnitudeAt(size_t x) { + inline float getMaximumMagnitudeAt(size_t x) { return m_server->getMaximumMagnitudeAt(x << m_xshift); } - float getPhaseAt(size_t x, size_t y) { + inline float getPhaseAt(size_t x, size_t y) { return m_server->getPhaseAt(x << m_xshift, y << m_yshift); } - void getValuesAt(size_t x, size_t y, float &real, float &imaginary) { + inline void getValuesAt(size_t x, size_t y, float &real, float &imaginary) { m_server->getValuesAt(x << m_xshift, y << m_yshift, real, imaginary); } - bool isColumnAvailable(size_t x) const { + inline bool isColumnAvailable(size_t x) const { return m_server->isColumnReady(x << m_xshift); } - float getMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) { + inline float getMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) { return m_server->getMagnitudesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio()); } - float getNormalizedMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) { + inline float getNormalizedMagnitudesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) { return m_server->getNormalizedMagnitudesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio()); } - float getPhasesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) { + inline float getPhasesAt(size_t x, float *values, size_t minbin = 0, size_t count = 0) { return m_server->getPhasesAt(x << m_xshift, values, minbin << m_yshift, count, getYRatio()); } - size_t getFillExtent() const { return m_server->getFillExtent(); } + inline size_t getFillExtent() const { return m_server->getFillExtent(); } // DenseThreeDimensionalModel and Model methods: // - virtual size_t getWidth() const { + inline virtual size_t getWidth() const { return m_server->getWidth() >> m_xshift; } - virtual size_t getHeight() const { + inline virtual size_t getHeight() const { // If there is no y-shift, the server's height (based on its // fftsize/2 + 1) is correct. If there is a shift, then the // server is using a larger fft size than we want, so we shift