feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 577cb49 was
1458de5,
checked in by Paul Brossier <piem@piem.org>, 12 years ago
|
aubio-types.h, aubiomodule.c: update for numpy 1.8
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | #include <Python.h> |
---|
2 | #include <structmember.h> |
---|
3 | #define NO_IMPORT_ARRAY |
---|
4 | #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
---|
5 | #include <numpy/arrayobject.h> |
---|
6 | #define AUBIO_UNSTABLE 1 |
---|
7 | #include <aubio.h> |
---|
8 | |
---|
9 | #define Py_default_vector_length 1024 |
---|
10 | #define Py_default_vector_height 1 |
---|
11 | |
---|
12 | #define Py_aubio_default_samplerate 44100 |
---|
13 | |
---|
14 | #if HAVE_AUBIO_DOUBLE |
---|
15 | #error "Ouch! Python interface for aubio has not been much tested yet." |
---|
16 | #define AUBIO_NPY_SMPL NPY_DOUBLE |
---|
17 | #else |
---|
18 | #define AUBIO_NPY_SMPL NPY_FLOAT |
---|
19 | #endif |
---|
20 | |
---|
21 | // special python type for cvec |
---|
22 | typedef struct |
---|
23 | { |
---|
24 | PyObject_HEAD |
---|
25 | cvec_t * o; |
---|
26 | uint_t length; |
---|
27 | uint_t channels; |
---|
28 | } Py_cvec; |
---|
29 | extern PyTypeObject Py_cvecType; |
---|
30 | |
---|
31 | // defined in aubio-proxy.c |
---|
32 | extern PyObject *PyAubio_CFvecToArray (fvec_t * self); |
---|
33 | extern fvec_t *PyAubio_ArrayToCFvec (PyObject * self); |
---|
34 | |
---|
35 | extern Py_cvec *PyAubio_CCvecToPyCvec (cvec_t * self); |
---|
36 | extern cvec_t *PyAubio_ArrayToCCvec (PyObject *input); |
---|
37 | |
---|
38 | extern PyObject *PyAubio_CFmatToArray (fmat_t * self); |
---|
39 | extern fmat_t *PyAubio_ArrayToCFmat (PyObject *input); |
---|
40 | |
---|
41 | // hand written wrappers |
---|
42 | extern PyTypeObject Py_filterType; |
---|
43 | |
---|
44 | extern PyTypeObject Py_filterbankType; |
---|
45 | |
---|
46 | extern PyTypeObject Py_fftType; |
---|
47 | |
---|
48 | extern PyTypeObject Py_pvocType; |
---|
49 | |
---|
Note: See
TracBrowser
for help on using the repository browser.