Mercurial > hg > vamp-tempogram
diff SpectrogramProcessor.cpp @ 20:de7213b35755
* Removed warnings of comparisons with ints and size_t
author | Carl Bussey <c.bussey@se10.qmul.ac.uk> |
---|---|
date | Fri, 15 Aug 2014 15:17:28 +0100 |
parents | 1e4c02ca8b81 |
children | 12b952286959 |
line wrap: on
line diff
--- a/SpectrogramProcessor.cpp Fri Aug 15 12:34:07 2014 +0100 +++ b/SpectrogramProcessor.cpp Fri Aug 15 15:17:28 2014 +0100 @@ -68,7 +68,7 @@ while(readBlockPointerIndex <= inputLength) { int readPointer = readBlockPointerIndex - m_windowLength/2; - for (unsigned int n = 0; n < m_windowLength; n++){ + for (int n = 0; n < (int)m_windowLength; n++){ if(readPointer < 0 || readPointer >= (int)inputLength){ m_pFftInput[n] = 0.0; //pad with zeros } @@ -77,7 +77,7 @@ } readPointer++; } - for (unsigned int n = m_windowLength; n < m_fftLength; n++){ + for (int n = m_windowLength; n < (int)m_fftLength; n++){ m_pFftInput[n] = 0.0; } @@ -85,7 +85,7 @@ vector<float> binValues; //@todo: sample at logarithmic spacing? Leave for host? - for(unsigned int k = 0; k < m_numberOfOutputBins; k++){ + for(int k = 0; k < (int)m_numberOfOutputBins; k++){ binValues.push_back(m_pFftOutputReal[k]*m_pFftOutputReal[k] + m_pFftOutputImag[k]*m_pFftOutputImag[k]); //Magnitude or power? //std::cout << spectrogram[k][writeBlockPointer] << std::endl; }