Mercurial > hg > svcore
comparison data/fft/FFTFileCache.h @ 183:146eb9e35baa
* Improve output from Profiler class and make it incur less (no) overhead in
release builds with NO_TIMING defined
* Fix a lock contention issue in spectrogram
* Marginal optimisations elsewhere
| author | Chris Cannam |
|---|---|
| date | Tue, 10 Oct 2006 14:51:17 +0000 |
| parents | b23eea68357e |
| children | 91fdc752e540 |
comparison
equal
deleted
inserted
replaced
| 182:f75f8a1cd7b1 | 183:146eb9e35baa |
|---|---|
| 92 populateReadBuf(x); | 92 populateReadBuf(x); |
| 93 return getFromReadBufCompactSigned(x, y); | 93 return getFromReadBufCompactSigned(x, y); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 void populateReadBuf(size_t x) const { | 97 void populateReadBuf(size_t x) const; |
| 98 if (!m_readbuf) { | |
| 99 m_readbuf = new char[m_mfc->getHeight() * 2 * m_mfc->getCellSize()]; | |
| 100 } | |
| 101 m_mfc->getColumnAt(x, m_readbuf); | |
| 102 if (m_mfc->haveSetColumnAt(x + 1)) { | |
| 103 m_mfc->getColumnAt | |
| 104 (x + 1, m_readbuf + m_mfc->getCellSize() * m_mfc->getHeight()); | |
| 105 m_readbufWidth = 2; | |
| 106 } else { | |
| 107 m_readbufWidth = 1; | |
| 108 } | |
| 109 m_readbufCol = x; | |
| 110 } | |
| 111 | 98 |
| 112 float getNormalizationFactor(size_t col) const { | 99 float getNormalizationFactor(size_t col) const { |
| 113 if (m_storageType != Compact) { | 100 if (m_storageType != Compact) { |
| 114 return getFromReadBufStandard(col, m_mfc->getHeight() - 1); | 101 return getFromReadBufStandard(col, m_mfc->getHeight() - 1); |
| 115 } else { | 102 } else { |
