# HG changeset patch # User Chris Cannam # Date 1386065809 0 # Node ID 00f66226db5b7c59edb247555863d214fb920d3a # Parent 6acd63422d446f1c0878195d13b4dc2012bb6889 Avoid pathological FFT length of 1 in plugin tester diff -r 6acd63422d44 -r 00f66226db5b dsp/tempotracking/DownBeat.cpp --- a/dsp/tempotracking/DownBeat.cpp Tue Dec 03 10:02:46 2013 +0000 +++ b/dsp/tempotracking/DownBeat.cpp Tue Dec 03 10:16:49 2013 +0000 @@ -44,7 +44,10 @@ // 16x decimation, which is our expected normal situation) m_beatframesize = MathUtilities::nextPowerOfTwo (int((m_rate / decimationFactor) * 1.3)); -// std::cerr << "rate = " << m_rate << ", bfs = " << m_beatframesize << std::endl; + if (m_beatframesize < 2) { + m_beatframesize = 2; + } +// std::cerr << "rate = " << m_rate << ", dec = " << decimationFactor << ", bfs = " << m_beatframesize << std::endl; m_beatframe = new double[m_beatframesize]; m_fftRealOut = new double[m_beatframesize]; m_fftImagOut = new double[m_beatframesize];