Changeset 1ad9dc3
- Timestamp:
- May 11, 2016, 5:24:13 AM (9 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:
- 0df6e9e
- Parents:
- 34d0c25
- Location:
- python/ext
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubio-types.h
r34d0c25 r1ad9dc3 64 64 extern int PyAubio_ArrayToCFvec (PyObject * self, fvec_t *out); 65 65 66 extern PyObject * PyAubio_CCvecToPyCvec (cvec_t * self);67 66 extern int PyAubio_PyCvecToCCvec (PyObject *input, cvec_t *i); 68 67 -
python/ext/py-cvec.c
r34d0c25 r1ad9dc3 31 31 vec->length = length / 2 + 1; 32 32 return (PyObject*)vec; 33 }34 35 PyObject *36 PyAubio_CCvecToPyCvec (cvec_t * input) {37 if (input == NULL) {38 PyErr_SetString (PyExc_ValueError, "PyAubio_CCvecToPyCvec got a null cvec!");39 return NULL;40 }41 Py_cvec* vec = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);42 npy_intp dims[] = { input->length, 1 };43 vec->norm = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, input->norm);44 vec->phas = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, input->phas);45 vec->length = input->length;46 return (PyObject *)vec;47 33 } 48 34
Note: See TracChangeset
for help on using the changeset viewer.