2 #include <structmember.h>
4 //#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
6 // define numpy unique symbols for aubio
7 #define PY_ARRAY_UNIQUE_SYMBOL PYAUBIO_ARRAY_API
8 #define PY_UFUNC_UNIQUE_SYMBOL PYAUBIO_UFUNC_API
10 // only import array and ufunc from main module
11 #ifndef PY_AUBIO_MODULE_MAIN
12 #define NO_IMPORT_ARRAY
14 #include <numpy/arrayobject.h>
15 #ifndef PY_AUBIO_MODULE_UFUNC
16 #define NO_IMPORT_UFUNC
18 #include <numpy/ufuncobject.h>
22 //#include <numpy/npy_3kcompat.h>
24 #define AUBIO_UNSTABLE 1
27 #define Py_default_vector_length 1024
29 #define Py_aubio_default_samplerate 44100
32 #error "Ouch! Python interface for aubio has not been much tested yet."
33 #define AUBIO_NPY_SMPL NPY_DOUBLE
35 #define AUBIO_NPY_SMPL NPY_FLOAT
38 // special python type for cvec
46 extern PyTypeObject Py_cvecType;
48 // defined in aubio-proxy.c
49 extern PyObject *PyAubio_CFvecToArray (fvec_t * self);
50 extern fvec_t *PyAubio_ArrayToCFvec (PyObject * self);
52 extern Py_cvec *PyAubio_CCvecToPyCvec (cvec_t * self);
53 extern cvec_t *PyAubio_ArrayToCCvec (PyObject *input);
55 extern PyObject *PyAubio_CFmatToArray (fmat_t * self);
56 extern fmat_t *PyAubio_ArrayToCFmat (PyObject *input);
58 // hand written wrappers
59 extern PyTypeObject Py_filterType;
61 extern PyTypeObject Py_filterbankType;
63 extern PyTypeObject Py_fftType;
65 extern PyTypeObject Py_pvocType;