source: python/aubio-types.h @ cd6fc5a

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since cd6fc5a was cd6fc5a, checked in by Paul Brossier <piem@piem.org>, 11 years ago

python/: remove NPY_NO_DEPRECATED_API to build anyway

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[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]22typedef struct
23{
24  PyObject_HEAD
[615ac7d]25  cvec_t * o;
26  uint_t length;
27  uint_t channels;
28} Py_cvec;
[9b23eb31]29extern PyTypeObject Py_cvecType;
30
[03c3450]31// defined in aubio-proxy.c
32extern PyObject *PyAubio_CFvecToArray (fvec_t * self);
33extern fvec_t *PyAubio_ArrayToCFvec (PyObject * self);
34
35extern Py_cvec *PyAubio_CCvecToPyCvec (cvec_t * self);
36extern cvec_t *PyAubio_ArrayToCCvec (PyObject *input);
37
38extern PyObject *PyAubio_CFmatToArray (fmat_t * self);
39extern fmat_t *PyAubio_ArrayToCFmat (PyObject *input);
40
41// hand written wrappers
[9b23eb31]42extern PyTypeObject Py_filterType;
43
[615ac7d]44extern PyTypeObject Py_filterbankType;
[352fd5f]45
[615ac7d]46extern PyTypeObject Py_fftType;
47
48extern PyTypeObject Py_pvocType;
[03c3450]49
Note: See TracBrowser for help on using the repository browser.