feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 9590e81 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
|
Rev | Line | |
---|
[916f8983] | 1 | #include "config.h" |
---|
[83963b3] | 2 | #include "aubio_priv.h" |
---|
[916f8983] | 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 | { \ |
---|
[c17a0ee] | 11 | uint_t j; \ |
---|
| 12 | for (j = 0; j < o->length; j++) { \ |
---|
| 13 | o->OBJ[j] = OP (o->OBJ[j]); \ |
---|
[916f8983] | 14 | } \ |
---|
| 15 | } |
---|
| 16 | |
---|
[b155ed03] | 17 | #define AUBIO_OP_C(OPNAME, OP) \ |
---|
| 18 | AUBIO_OP(OPNAME, OP, fvec, data) |
---|
[916f8983] | 19 | |
---|
[b155ed03] | 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) |
---|
[916f8983] | 30 | |
---|
| 31 | void fvec_pow (fvec_t *s, smpl_t power) |
---|
| 32 | { |
---|
[c17a0ee] | 33 | uint_t j; |
---|
| 34 | for (j = 0; j < s->length; j++) { |
---|
| 35 | s->data[j] = POW(s->data[j], power); |
---|
[916f8983] | 36 | } |
---|
| 37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.