Changeset b201912 for src/mathutils.c
- Timestamp:
- Apr 11, 2017, 1:49:44 AM (7 years ago)
- Branches:
- sampler
- Children:
- 04d0c89
- Parents:
- fbafd2c (diff), b762f8d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
rfbafd2c rb201912 290 290 } 291 291 292 void fvec_push(fvec_t *in, smpl_t new_elem) { 293 uint_t i; 294 for (i = 0; i < in->length - 1; i++) { 295 in->data[i] = in->data[i + 1]; 296 } 297 in->data[in->length - 1] = new_elem; 298 } 299 300 void fvec_clamp(fvec_t *in, smpl_t absmax) { 301 uint_t i; 302 for (i = 0; i < in->length; i++) { 303 if (in->data[i] > 0 && in->data[i] > ABS(absmax)) { 304 in->data[i] = absmax; 305 } else if (in->data[i] < 0 && in->data[i] < -ABS(absmax)) { 306 in->data[i] = -absmax; 307 } 308 } 309 } 310 292 311 smpl_t 293 312 aubio_level_lin (const fvec_t * f)
Note: See TracChangeset
for help on using the changeset viewer.