Changeset 92a8800 for python/ext/py-fft.c
- Timestamp:
- Apr 28, 2016, 6:59:55 PM (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:
- 6937842
- Parents:
- 1f4d932
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-fft.c
r1f4d932 r92a8800 14 14 cvec_t *out; 15 15 fvec_t *rout; 16 // bridge for cvec output17 Py_cvec *py_out;18 16 } Py_fft; 19 17 … … 61 59 62 60 self->out = new_cvec(self->win_s); 63 self->py_out = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);64 Py_XINCREF(self->py_out);65 61 self->rout = new_fvec(self->win_s); 66 62 … … 71 67 Py_fft_del (Py_fft *self, PyObject *unused) 72 68 { 73 Py_XDECREF((PyObject*)(self->py_out));74 69 del_aubio_fft(self->o); 75 70 del_cvec(self->out); … … 93 88 // compute the function 94 89 aubio_fft_do (((Py_fft *)self)->o, &(self->vecin), self->out); 95 #if 0 96 Py_cvec * py_out = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType); 97 PyObject* output = PyAubio_CCvecToPyCvec(self->out, py_out); 98 return output; 99 #else 100 // convert cvec to py_cvec, incrementing refcount to keep a copy 101 return PyAubio_CCvecToPyCvec(self->out, self->py_out); 102 #endif 90 // convert cvec to py_cvec 91 return PyAubio_CCvecToPyCvec(self->out); 103 92 } 104 93 … … 118 107 } 119 108 120 if (!PyAubio_ ArrayToCCvec (input, &(self->cvecin)) ) {109 if (!PyAubio_PyCvecToCCvec (input, &(self->cvecin)) ) { 121 110 return NULL; 122 111 }
Note: See TracChangeset
for help on using the changeset viewer.