feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 146280a was
352fd5f,
checked in by Paul Brossier <piem@piem.org>, 15 years ago
|
python/py-fvec.c, python/aubio-types.g: define AUBIO_FLOAT, move default length and channels here, rename fvec to aubio.fvec
|
-
Property mode set to
100644
|
File size:
728 bytes
|
Line | |
---|
1 | #include <Python.h> |
---|
2 | #include <structmember.h> |
---|
3 | #define NO_IMPORT_ARRAY |
---|
4 | #include <numpy/arrayobject.h> |
---|
5 | #include <aubio.h> |
---|
6 | |
---|
7 | #define Py_fvec_default_length 1024 |
---|
8 | #define Py_fvec_default_channels 1 |
---|
9 | |
---|
10 | #ifdef HAVE_AUBIO_DOUBLE |
---|
11 | #define AUBIO_FLOAT NPY_FLOAT |
---|
12 | #else |
---|
13 | #define AUBIO_FLOAT NPY_LONG |
---|
14 | #endif |
---|
15 | |
---|
16 | /** |
---|
17 | |
---|
18 | Defining this constant to 1 will allow PyAubio_CastToFvec to convert from data |
---|
19 | types different than NPY_FLOAT to and fvec, and therefore creating a copy of |
---|
20 | it. |
---|
21 | |
---|
22 | */ |
---|
23 | #define AUBIO_DO_CASTING 0 |
---|
24 | |
---|
25 | typedef struct |
---|
26 | { |
---|
27 | PyObject_HEAD fvec_t * o; |
---|
28 | uint_t length; |
---|
29 | uint_t channels; |
---|
30 | } Py_fvec; |
---|
31 | extern PyTypeObject Py_fvecType; |
---|
32 | |
---|
33 | extern PyObject *PyAubio_FvecToArray (Py_fvec * self); |
---|
34 | |
---|
35 | extern Py_fvec *PyAubio_ArrayToFvec (PyObject * self); |
---|
Note: See
TracBrowser
for help on using the repository browser.