diff plugins/OnsetDetect.cpp @ 95:e51152b7ee06

* Fixes to problems shown by vamp-plugin-tester
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 23 Mar 2009 16:29:12 +0000
parents d47b22cf47bc
children 4a354c18e688
line wrap: on
line diff
--- a/plugins/OnsetDetect.cpp	Tue Mar 17 15:20:40 2009 +0000
+++ b/plugins/OnsetDetect.cpp	Mon Mar 23 16:29:12 2009 +0000
@@ -272,6 +272,7 @@
 OnsetDetector::getPreferredStepSize() const
 {
     size_t step = size_t(m_inputSampleRate * m_preferredStepSecs + 0.0001);
+    if (step < 1) step = 1;
 //    std::cerr << "OnsetDetector::getPreferredStepSize: input sample rate is " << m_inputSampleRate << ", step size is " << step << std::endl;
     return step;
 }