feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since bef979a was
b155ed03,
checked in by Paul Brossier <piem@piem.org>, 11 years ago
|
src/vecutils.*: remove cvec functions for clarity
|
-
Property mode set to
100644
|
File size:
749 bytes
|
Line | |
---|
1 | #include "config.h" |
---|
2 | #include "aubio_priv.h" |
---|
3 | #include "types.h" |
---|
4 | #include "fvec.h" |
---|
5 | #include "cvec.h" |
---|
6 | #include "vecutils.h" |
---|
7 | |
---|
8 | #define AUBIO_OP(OPNAME, OP, TYPE, OBJ) \ |
---|
9 | void TYPE ## _ ## OPNAME (TYPE ## _t *o) \ |
---|
10 | { \ |
---|
11 | uint_t j; \ |
---|
12 | for (j = 0; j < o->length; j++) { \ |
---|
13 | o->OBJ[j] = OP (o->OBJ[j]); \ |
---|
14 | } \ |
---|
15 | } |
---|
16 | |
---|
17 | #define AUBIO_OP_C(OPNAME, OP) \ |
---|
18 | AUBIO_OP(OPNAME, OP, fvec, data) |
---|
19 | |
---|
20 | AUBIO_OP_C(exp, EXP) |
---|
21 | AUBIO_OP_C(cos, COS) |
---|
22 | AUBIO_OP_C(sin, SIN) |
---|
23 | AUBIO_OP_C(abs, ABS) |
---|
24 | AUBIO_OP_C(sqrt, SQRT) |
---|
25 | AUBIO_OP_C(log10, SAFE_LOG10) |
---|
26 | AUBIO_OP_C(log, SAFE_LOG) |
---|
27 | AUBIO_OP_C(floor, FLOOR) |
---|
28 | AUBIO_OP_C(ceil, CEIL) |
---|
29 | AUBIO_OP_C(round, ROUND) |
---|
30 | |
---|
31 | void fvec_pow (fvec_t *s, smpl_t power) |
---|
32 | { |
---|
33 | uint_t j; |
---|
34 | for (j = 0; j < s->length; j++) { |
---|
35 | s->data[j] = POW(s->data[j], power); |
---|
36 | } |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.