comparison src/vector.c @ 42:84e69b155098

Numerous fixes, see ChangeLog
author Jamie Bullock <jamie@postlude.co.uk>
date Tue, 12 Dec 2006 21:47:42 +0000
parents afb9e6fee244
children 4a36f70a76e9
comparison
equal deleted inserted replaced
41:afb9e6fee244 42:84e69b155098
290 ratio = freqs[n] / f0; 290 ratio = freqs[n] / f0;
291 nearest = round(ratio); 291 nearest = round(ratio);
292 distance = fabs(nearest - ratio); 292 distance = fabs(nearest - ratio);
293 if(distance > thresh) 293 if(distance > thresh)
294 result[n] = result[M + n] = 0.f; 294 result[n] = result[M + n] = 0.f;
295 else 295 else {
296 result[n] = result[M + n] = freqs[n]; 296 result[n] = freqs[n];
297 result[M + n] = amps[n];
298 }
297 } 299 }
298 else 300 else
299 result[n] = result[M + n] = 0.f; 301 result[n] = result[M + n] = 0.f;
300 } 302 }
301 return SUCCESS; 303 return SUCCESS;