History

[py] check for float in filterbank.set_mel_coeffs, improve parameter names

Paul Brossier committed 7 years ago

Commit f6bfc261 parent 6d41dac1 file · +9 −9Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/ext/py-filterbank.c+9−9
@@ -181,11 +181,11 @@ Py_filterbank_set_mel_coeffs (Py_filterbank * self, PyObject *args) · 180 unmodified lines
181{181{
182 uint_t err = 0;182 uint_t err = 0;
183 183
184 uint_t samplerate;184 smpl_t samplerate;
185 smpl_t freq_min;185 smpl_t freq_min;
186 smpl_t freq_max;186 smpl_t freq_max;
187 if (!PyArg_ParseTuple (args, "I" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR,187 if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR
188 &samplerate, &freq_min, &freq_max)) {188 AUBIO_NPY_SMPL_CHR, &samplerate, &freq_min, &freq_max)) {
189 return NULL;189 return NULL;
190 }190 }
191 191
@@ -210,11 +210,11 @@ Py_filterbank_set_mel_coeffs_htk (Py_filterbank * self, PyObject *args) · 18 unmodified lines
210{210{
211 uint_t err = 0;211 uint_t err = 0;
212 212
213 uint_t samplerate;213 smpl_t samplerate;
214 smpl_t freq_min;214 smpl_t freq_min;
215 smpl_t freq_max;215 smpl_t freq_max;
216 if (!PyArg_ParseTuple (args, "I" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR,216 if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR
217 &samplerate, &freq_min, &freq_max)) {217 AUBIO_NPY_SMPL_CHR, &samplerate, &freq_min, &freq_max)) {
218 return NULL;218 return NULL;
219 }219 }
220 220
@@ -268,12 +268,12 @@ Py_filterbank_get_coeffs (Py_filterbank * self, PyObject *unused) · 47 unmodified lines
268static PyObject *268static PyObject *
269Py_filterbank_set_power(Py_filterbank *self, PyObject *args)269Py_filterbank_set_power(Py_filterbank *self, PyObject *args)
270{270{
271 uint_t playing;271 uint_t power;
272 272
273 if (!PyArg_ParseTuple (args, "I", &playing)) {273 if (!PyArg_ParseTuple (args, "I", &power)) {
274 return NULL;274 return NULL;
275 }275 }
276 if(aubio_filterbank_set_power (self->o, playing)) {276 if(aubio_filterbank_set_power (self->o, power)) {
277 if (PyErr_Occurred() == NULL) {277 if (PyErr_Occurred() == NULL) {
278 PyErr_SetString (PyExc_ValueError,278 PyErr_SetString (PyExc_ValueError,
279 "error running filterbank.set_power");279 "error running filterbank.set_power");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t