Changeset a138975
- Timestamp:
- May 12, 2016, 1:28:35 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:
- 2ee90df
- Parents:
- 911c22f
- git-author:
- Paul Brossier <piem@piem.org> (05/11/16 15:10:02)
- git-committer:
- Paul Brossier <piem@piem.org> (05/12/16 01:28:35)
- Location:
- python/ext
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-cvec.c
r911c22f ra138975 141 141 Py_cvec_set_norm (Py_cvec * vec, PyObject *input, void * closure) 142 142 { 143 npy_intp length; 143 144 if (!PyAubio_IsValidVector(input)) { 144 145 return 1; 145 146 } 146 npy_intplength = PyArray_SIZE ((PyArrayObject *)input);147 length = PyArray_SIZE ((PyArrayObject *)input); 147 148 if (length != vec->length) { 148 149 PyErr_Format (PyExc_ValueError, … … 161 162 Py_cvec_set_phas (Py_cvec * vec, PyObject *input, void * closure) 162 163 { 164 npy_intp length; 163 165 if (!PyAubio_IsValidVector(input)) { 164 166 return 1; 165 167 } 166 npy_intplength = PyArray_SIZE ((PyArrayObject *)input);168 length = PyArray_SIZE ((PyArrayObject *)input); 167 169 if (length != vec->length) { 168 170 PyErr_Format (PyExc_ValueError, -
python/ext/py-fft.c
r911c22f ra138975 81 81 { 82 82 PyObject *input; 83 cvec_t c_out; 83 84 84 85 if (!PyArg_ParseTuple (args, "O", &input)) { … … 97 98 } 98 99 99 cvec_t c_out;100 100 Py_INCREF(self->doout); 101 101 if (!PyAubio_PyCvecToCCvec(self->doout, &c_out)) { … … 117 117 { 118 118 PyObject *input; 119 fvec_t out; 119 120 120 121 if (!PyArg_ParseTuple (args, "O", &input)) { … … 133 134 } 134 135 135 fvec_t out;136 136 Py_INCREF(self->rdoout); 137 137 if (!PyAubio_ArrayToCFvec(self->rdoout, &out) ) { -
python/ext/py-source.c
r911c22f ra138975 174 174 Py_source_do(Py_source * self, PyObject * args) 175 175 { 176 PyObject *outputs; 176 177 uint_t read; 177 178 read = 0; … … 184 185 aubio_source_do (self->o, &(self->c_read_to), &read); 185 186 186 PyObject *outputs = PyTuple_New(2);187 outputs = PyTuple_New(2); 187 188 PyTuple_SetItem( outputs, 0, self->read_to ); 188 189 PyTuple_SetItem( outputs, 1, (PyObject *)PyLong_FromLong(read)); … … 194 195 Py_source_do_multi(Py_source * self, PyObject * args) 195 196 { 197 PyObject *outputs; 196 198 uint_t read; 197 199 read = 0; … … 204 206 aubio_source_do_multi (self->o, &(self->c_mread_to), &read); 205 207 206 PyObject *outputs = PyTuple_New(2);208 outputs = PyTuple_New(2); 207 209 PyTuple_SetItem( outputs, 0, self->mread_to); 208 210 PyTuple_SetItem( outputs, 1, (PyObject *)PyLong_FromLong(read)); -
python/ext/ufuncs.c
r911c22f ra138975 85 85 { 86 86 int err = 0; 87 PyObject *dict, *f, *g, *h; 87 88 88 89 err = _import_umath (); … … 92 93 } 93 94 94 PyObject *f, *dict;95 95 dict = PyModule_GetDict(m); 96 96 f = PyUFunc_FromFuncAndData(Py_aubio_unary_functions, Py_unwrap2pi_data, Py_aubio_unary_types, … … 100 100 Py_DECREF(f); 101 101 102 PyObject *g;103 102 g = PyUFunc_FromFuncAndData(Py_aubio_unary_functions, Py_freqtomidi_data, Py_aubio_unary_types, 104 103 Py_aubio_unary_n_types, Py_aubio_unary_n_inputs, Py_aubio_unary_n_outputs, … … 107 106 Py_DECREF(g); 108 107 109 PyObject *h;110 108 h = PyUFunc_FromFuncAndData(Py_aubio_unary_functions, Py_miditofreq_data, Py_aubio_unary_types, 111 109 Py_aubio_unary_n_types, Py_aubio_unary_n_inputs, Py_aubio_unary_n_outputs,
Note: See TracChangeset
for help on using the changeset viewer.