Mercurial > hg > qm-vamp-plugins
comparison 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 |
comparison
equal
deleted
inserted
replaced
15:3b02e26b23ff | 16:2fbfe5e42ad4 |
---|---|
334 delete[] imag; | 334 delete[] imag; |
335 | 335 |
336 Feature feature; | 336 Feature feature; |
337 feature.hasTimestamp = false; | 337 feature.hasTimestamp = false; |
338 for (size_t i = 0; i < m_config.BPO; ++i) { | 338 for (size_t i = 0; i < m_config.BPO; ++i) { |
339 feature.values.push_back(output[i]); | 339 double value = output[i]; |
340 if (isnan(value)) value = 0.0; | |
341 feature.values.push_back(value); | |
340 } | 342 } |
341 feature.label = ""; | 343 feature.label = ""; |
342 | 344 |
343 FeatureSet returnFeatures; | 345 FeatureSet returnFeatures; |
344 returnFeatures[0].push_back(feature); | 346 returnFeatures[0].push_back(feature); |