source: python/aubio-types.h @ 7a6521d

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

aubiomodule.c: simplify includes

  • Property mode set to 100644
File size: 1.4 KB
Line 
1#include "Python.h"
2#include <structmember.h>
3
4//#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
5
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
9
10// only import array and ufunc from main module
11#ifndef PY_AUBIO_MODULE_MAIN
12#define NO_IMPORT_ARRAY
13#define NO_IMPORT_UFUNC
14#endif
15
16// import aubio
17#include <numpy/ndarraytypes.h>
18#include <numpy/ufuncobject.h>
19#include <numpy/npy_3kcompat.h>
20
21#define AUBIO_UNSTABLE 1
22#include <aubio.h>
23
24#define Py_default_vector_length 1024
25
26#define Py_aubio_default_samplerate 44100
27
28#if HAVE_AUBIO_DOUBLE
29#error "Ouch! Python interface for aubio has not been much tested yet."
30#define AUBIO_NPY_SMPL NPY_DOUBLE
31#else
32#define AUBIO_NPY_SMPL NPY_FLOAT
33#endif
34
35// special python type for cvec
36typedef struct
37{
38  PyObject_HEAD
39  cvec_t * o;
40  uint_t length;
41  uint_t channels;
42} Py_cvec;
43extern PyTypeObject Py_cvecType;
44
45// defined in aubio-proxy.c
46extern PyObject *PyAubio_CFvecToArray (fvec_t * self);
47extern fvec_t *PyAubio_ArrayToCFvec (PyObject * self);
48
49extern Py_cvec *PyAubio_CCvecToPyCvec (cvec_t * self);
50extern cvec_t *PyAubio_ArrayToCCvec (PyObject *input);
51
52extern PyObject *PyAubio_CFmatToArray (fmat_t * self);
53extern fmat_t *PyAubio_ArrayToCFmat (PyObject *input);
54
55// hand written wrappers
56extern PyTypeObject Py_filterType;
57
58extern PyTypeObject Py_filterbankType;
59
60extern PyTypeObject Py_fftType;
61
62extern PyTypeObject Py_pvocType;
63
Note: See TracBrowser for help on using the repository browser.