Changeset a52d3ae for interfaces
- Timestamp:
- Dec 25, 2009, 4:45:18 AM (15 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:
- 363ce7a
- Parents:
- c04d250
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
interfaces/python/py-filter.c
rc04d250 ra52d3ae 17 17 static char *kwlist[] = { "order", NULL }; 18 18 19 if (!PyArg_ParseTupleAndKeywords (args, kwds, "|I I", kwlist,19 if (!PyArg_ParseTupleAndKeywords (args, kwds, "|I", kwlist, 20 20 &order)) { 21 21 return NULL; … … 60 60 61 61 static PyObject * 62 Py_filter_do(Py Object* self, PyObject * args)62 Py_filter_do(Py_filter * self, PyObject * args) 63 63 { 64 64 PyObject *input; 65 Py_fvec*vec;65 fvec_t *vec; 66 66 67 67 if (!PyArg_ParseTuple (args, "O:digital_filter.do", &input)) { … … 73 73 } 74 74 75 vec = PyAubio_ArrayTo Fvec (input);75 vec = PyAubio_ArrayToCFvec (input); 76 76 77 77 if (vec == NULL) { … … 80 80 81 81 // compute the function 82 #if 1 83 aubio_filter_do (((Py_filter *)self)->o, vec->o); 84 PyArray_INCREF((PyArrayObject*)vec); 85 return (PyObject *)vec; 86 #else 87 Py_fvec *copy = (Py_fvec*) PyObject_New (Py_fvec, &Py_fvecType); 88 copy->o = new_fvec(vec->o->length); 89 aubio_filter_do_outplace (((Py_filter *)self)->o, vec->o, copy->o); 90 return (PyObject *)copy; 91 #endif 82 fvec_t * out = new_fvec(vec->length); 83 aubio_filter_do_outplace (self->o, vec, out); 84 return PyAubio_CFvecToArray(out); 92 85 } 93 86
Note: See TracChangeset
for help on using the changeset viewer.