Changeset 92a8800 for python/ext/aubioproxy.c
- Timestamp:
- Apr 28, 2016, 6:59:55 PM (8 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 6937842
- Parents:
- 1f4d932
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubioproxy.c
r1f4d932 r92a8800 54 54 out->data = (smpl_t *) PyArray_GETPTR1 ((PyArrayObject *)input, 0); 55 55 return 1; 56 }57 58 PyObject *59 PyAubio_CCvecToPyCvec (cvec_t * input, Py_cvec *vec) {60 vec->length = input->length;61 vec->o = input;62 // keep a reference to re-use after returning it63 Py_INCREF(vec);64 return (PyObject *)vec;65 }66 67 int68 PyAubio_ArrayToCCvec (PyObject *input, cvec_t *i) {69 if (PyObject_TypeCheck (input, &Py_cvecType)) {70 //*i = *(((Py_cvec*)input)->o);71 i->norm = ((Py_cvec*)input)->o->norm;72 i->phas = ((Py_cvec*)input)->o->phas;73 i->length = ((Py_cvec*)input)->o->length;74 return 1;75 } else {76 PyErr_SetString (PyExc_ValueError, "input array should be aubio.cvec");77 return 0;78 }79 56 } 80 57
Note: See TracChangeset
for help on using the changeset viewer.