Changeset 7c785e6 for python/ext
- Timestamp:
- Apr 18, 2016, 9:14:41 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:
- 4041a6d
- Parents:
- de81d2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-filter.c
rde81d2b r7c785e6 6 6 aubio_filter_t * o; 7 7 uint_t order; 8 fvec_t *out; 8 9 } Py_filter; 9 10 … … 48 49 return -1; 49 50 } 50 51 self->out = new_fvec(Py_default_vector_length); 51 52 return 0; 52 53 } … … 55 56 Py_filter_del (Py_filter * self) 56 57 { 58 del_fvec(self->out); 57 59 del_aubio_filter (self->o); 58 60 self->ob_type->tp_free ((PyObject *) self); … … 79 81 } 80 82 83 // reallocate the output if needed 84 if (vec->length != self->out->length) { 85 del_fvec(self->out); 86 self->out = new_fvec(vec->length); 87 } 81 88 // compute the function 82 fvec_t * out = new_fvec(vec->length); 83 aubio_filter_do_outplace (self->o, vec, out); 84 return PyAubio_CFvecToArray(out); 89 aubio_filter_do_outplace (self->o, vec, self->out); 90 return PyAubio_CFvecToArray(self->out); 85 91 } 86 92
Note: See TracChangeset
for help on using the changeset viewer.