Mercurial > hg > svcore
diff data/fft/FFTDataServer.cpp @ 300:5877d68815c7
* Change WaveFileModel API from getValues(start,end) to getData(start,count).
It's much less error-prone to pass in frame counts instead of start/end
locations. Should have done this ages ago. This closes #1794563.
* Add option to apply a transform to only the selection region, instead of
the whole audio.
* (to make the above work properly) Add start frame offset to wave models
author | Chris Cannam |
---|---|
date | Mon, 01 Oct 2007 13:48:38 +0000 |
parents | a2dc34ce146a |
children | aa8dbac62024 |
line wrap: on
line diff
--- a/data/fft/FFTDataServer.cpp Fri Sep 28 16:15:06 2007 +0000 +++ b/data/fft/FFTDataServer.cpp Mon Oct 01 13:48:38 2007 +0000 @@ -1056,8 +1056,11 @@ << " from channel " << m_channel << std::endl; #endif - size_t got = m_model->getValues(m_channel, startFrame + pfx, - endFrame, m_fftInput + off + pfx); + size_t count = 0; + if (endFrame > startFrame + pfx) count = endFrame - (startFrame + pfx); + + size_t got = m_model->getData(m_channel, startFrame + pfx, + count, m_fftInput + off + pfx); while (got + pfx < m_windowSize) { m_fftInput[off + got + pfx] = 0.0;