Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.c

    rb799241 r33d0242  
    290290}
    291291
    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 
    311292smpl_t
    312293aubio_level_lin (const fvec_t * f)
Note: See TracChangeset for help on using the changeset viewer.