# HG changeset patch # User Chris Cannam # Date 1409823631 -3600 # Node ID a824d7d14eb96ce69cfcfba88b2bdbddd45b20a5 # Parent 023d12fb71b1c12a68e46504f080a46652b121c0 Clamp band boundaries to block size diff -r 023d12fb71b1 -r a824d7d14eb9 NoveltyCurveProcessor.cpp --- a/NoveltyCurveProcessor.cpp Thu Sep 04 10:08:47 2014 +0100 +++ b/NoveltyCurveProcessor.cpp Thu Sep 04 10:40:31 2014 +0100 @@ -37,9 +37,11 @@ for (unsigned int band = 1; band < m_numberOfBands; band++){ float lowFreq = 500*pow(2.5, (int)band-1); m_pBandBoundaries[band] = m_fftLength*lowFreq/m_samplingFrequency; + if (m_pBandBoundaries[band] > (int)m_blockSize) { + m_pBandBoundaries[band] = m_blockSize; + } } m_pBandBoundaries[m_numberOfBands] = m_blockSize; - m_pBandSum = new float [m_numberOfBands]; }