diff plugins/ChromagramPlugin.cpp @ 16:2fbfe5e42ad4

* Avoid NaNs in output values
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 13 Oct 2006 12:28:44 +0000
parents 74ce5b481132
children d4a92aab8147
line wrap: on
line diff
--- a/plugins/ChromagramPlugin.cpp	Thu Oct 05 15:50:30 2006 +0000
+++ b/plugins/ChromagramPlugin.cpp	Fri Oct 13 12:28:44 2006 +0000
@@ -336,7 +336,9 @@
     Feature feature;
     feature.hasTimestamp = false;
     for (size_t i = 0; i < m_config.BPO; ++i) {
-	feature.values.push_back(output[i]);
+        double value = output[i];
+        if (isnan(value)) value = 0.0;
+	feature.values.push_back(value);
     }
     feature.label = "";