Changeset 569b363 for python/ext/py-phasevoc.c
- Timestamp:
- Apr 24, 2016, 6:23:14 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:
- 51b9c83
- Parents:
- a35db12
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-phasevoc.c
ra35db12 r569b363 1 1 #include "aubio-types.h" 2 3 static char Py_pvoc_doc[] = "pvoc object";4 2 5 3 typedef struct … … 9 7 uint_t win_s; 10 8 uint_t hop_s; 11 fvec_t *vecin;9 fvec_t vecin; 12 10 cvec_t *output; 13 11 Py_cvec *py_out; 14 cvec_t *cvecin;12 cvec_t cvecin; 15 13 fvec_t *routput; 16 14 } Py_pvoc; … … 72 70 } 73 71 74 self->cvecin = (cvec_t *)malloc(sizeof(cvec_t));75 self->vecin = (fvec_t *)malloc(sizeof(fvec_t));76 77 72 self->output = new_cvec(self->win_s); 78 73 self->py_out = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType); … … 89 84 del_cvec(self->output); 90 85 del_fvec(self->routput); 91 free(self->cvecin);92 free(self->vecin);93 86 Py_TYPE(self)->tp_free((PyObject *) self); 94 87 } … … 104 97 } 105 98 106 if (!PyAubio_ArrayToCFvec (input, self->vecin)) {99 if (!PyAubio_ArrayToCFvec (input, &(self->vecin) )) { 107 100 return NULL; 108 101 } 109 102 110 103 // compute the function 111 aubio_pvoc_do (self->o, self->vecin, self->output);104 aubio_pvoc_do (self->o, &(self->vecin), self->output); 112 105 #if 0 113 106 Py_cvec * py_out = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType); … … 136 129 } 137 130 138 if (!PyAubio_ArrayToCCvec (input, self->cvecin)) {131 if (!PyAubio_ArrayToCCvec (input, &(self->cvecin) )) { 139 132 return NULL; 140 133 } 141 134 142 135 // compute the function 143 aubio_pvoc_rdo (self->o, self->cvecin, self->routput);136 aubio_pvoc_rdo (self->o, &(self->cvecin), self->routput); 144 137 return PyAubio_CFvecToArray(self->routput); 145 138 }
Note: See TracChangeset
for help on using the changeset viewer.