source: src/vecutils.c @ 6200052

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/timestretchfix/ffmpeg5
Last change on this file since 6200052 was 33d0242, checked in by Paul Brossier <piem@piem.org>, 8 years ago

src/aubio_priv.h: move include config.h here

  • Property mode set to 100644
File size: 729 bytes
Line 
1#include "aubio_priv.h"
2#include "types.h"
3#include "fvec.h"
4#include "cvec.h"
5#include "vecutils.h"
6
7#define AUBIO_OP(OPNAME, OP, TYPE, OBJ) \
8void TYPE ## _ ## OPNAME (TYPE ## _t *o) \
9{ \
10  uint_t j; \
11  for (j = 0; j < o->length; j++) { \
12    o->OBJ[j] = OP (o->OBJ[j]); \
13  } \
14}
15
16#define AUBIO_OP_C(OPNAME, OP) \
17  AUBIO_OP(OPNAME, OP, fvec, data)
18
19AUBIO_OP_C(exp, EXP)
20AUBIO_OP_C(cos, COS)
21AUBIO_OP_C(sin, SIN)
22AUBIO_OP_C(abs, ABS)
23AUBIO_OP_C(sqrt, SQRT)
24AUBIO_OP_C(log10, SAFE_LOG10)
25AUBIO_OP_C(log, SAFE_LOG)
26AUBIO_OP_C(floor, FLOOR)
27AUBIO_OP_C(ceil, CEIL)
28AUBIO_OP_C(round, ROUND)
29
30void fvec_pow (fvec_t *s, smpl_t power)
31{
32  uint_t j;
33  for (j = 0; j < s->length; j++) {
34    s->data[j] = POW(s->data[j], power);
35  }
36}
Note: See TracBrowser for help on using the repository browser.