Mercurial > hg > qm-dsp
comparison maths/MathUtilities.cpp @ 283:5e125f030287
* Fixes to problems shown up by vamp-plugin-tester.
Still not all plugins pass all tests, though
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 23 Mar 2009 16:28:53 +0000 |
parents | 9c403afdd9e9 |
children | 702ff8c08137 |
comparison
equal
deleted
inserted
replaced
282:2703b3437aee | 283:5e125f030287 |
---|---|
161 void MathUtilities::getFrameMinMax(const double *data, unsigned int len, double *min, double *max) | 161 void MathUtilities::getFrameMinMax(const double *data, unsigned int len, double *min, double *max) |
162 { | 162 { |
163 unsigned int i; | 163 unsigned int i; |
164 double temp = 0.0; | 164 double temp = 0.0; |
165 double a=0.0; | 165 double a=0.0; |
166 | |
167 if (len == 0) { | |
168 *min = *max = 0; | |
169 return; | |
170 } | |
166 | 171 |
167 *min = data[0]; | 172 *min = data[0]; |
168 *max = data[0]; | 173 *max = data[0]; |
169 | 174 |
170 for( i = 0; i < len; i++) | 175 for( i = 0; i < len; i++) |