source:
python/aubio-types.h
@
bab24a0
Last change on this file since bab24a0 was cd6fc5a, checked in by , 12 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[ae6e15c] | 1 | #include <Python.h> |
2 | #include <structmember.h> | |
3 | #define NO_IMPORT_ARRAY | |
[cd6fc5a] | 4 | //#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION |
[ae6e15c] | 5 | #include <numpy/arrayobject.h> |
[7db3477] | 6 | #define AUBIO_UNSTABLE 1 |
[ae6e15c] | 7 | #include <aubio.h> |
8 | ||
[96fe713] | 9 | #define Py_default_vector_length 1024 |
10 | #define Py_default_vector_height 1 | |
[9b23eb31] | 11 | |
12 | #define Py_aubio_default_samplerate 44100 | |
[352fd5f] | 13 | |
[615ac7d] | 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 | |
[352fd5f] | 17 | #else |
[615ac7d] | 18 | #define AUBIO_NPY_SMPL NPY_FLOAT |
[352fd5f] | 19 | #endif |
20 | ||
[03c3450] | 21 | // special python type for cvec |
[96fe713] | 22 | typedef struct |
23 | { | |
24 | PyObject_HEAD | |
[615ac7d] | 25 | cvec_t * o; |
26 | uint_t length; | |
27 | uint_t channels; | |
28 | } Py_cvec; | |
[9b23eb31] | 29 | extern PyTypeObject Py_cvecType; |
30 | ||
[03c3450] | 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 | |
[9b23eb31] | 42 | extern PyTypeObject Py_filterType; |
43 | ||
[615ac7d] | 44 | extern PyTypeObject Py_filterbankType; |
[352fd5f] | 45 | |
[615ac7d] | 46 | extern PyTypeObject Py_fftType; |
47 | ||
48 | extern PyTypeObject Py_pvocType; | |
[03c3450] | 49 |
Note: See TracBrowser
for help on using the repository browser.