From: Paul Brossier Date: Sat, 17 Nov 2018 13:01:56 +0000 (+0100) Subject: [py] check for float in filterbank.set_mel_coeffs, improve parameter names X-Git-Tag: 0.4.8~40 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=f6bfc261fff914a8ff58152fab64a8f3bda68323 [py] check for float in filterbank.set_mel_coeffs, improve parameter names --- diff --git a/python/ext/py-filterbank.c b/python/ext/py-filterbank.c index 62c6a26e..99d81d9e 100644 --- a/python/ext/py-filterbank.c +++ b/python/ext/py-filterbank.c @@ -181,11 +181,11 @@ Py_filterbank_set_mel_coeffs (Py_filterbank * self, PyObject *args) { uint_t err = 0; - uint_t samplerate; + smpl_t samplerate; smpl_t freq_min; smpl_t freq_max; - if (!PyArg_ParseTuple (args, "I" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, - &samplerate, &freq_min, &freq_max)) { + if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR + AUBIO_NPY_SMPL_CHR, &samplerate, &freq_min, &freq_max)) { return NULL; } @@ -210,11 +210,11 @@ Py_filterbank_set_mel_coeffs_htk (Py_filterbank * self, PyObject *args) { uint_t err = 0; - uint_t samplerate; + smpl_t samplerate; smpl_t freq_min; smpl_t freq_max; - if (!PyArg_ParseTuple (args, "I" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, - &samplerate, &freq_min, &freq_max)) { + if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR + AUBIO_NPY_SMPL_CHR, &samplerate, &freq_min, &freq_max)) { return NULL; } @@ -268,12 +268,12 @@ Py_filterbank_get_coeffs (Py_filterbank * self, PyObject *unused) static PyObject * Py_filterbank_set_power(Py_filterbank *self, PyObject *args) { - uint_t playing; + uint_t power; - if (!PyArg_ParseTuple (args, "I", &playing)) { + if (!PyArg_ParseTuple (args, "I", &power)) { return NULL; } - if(aubio_filterbank_set_power (self->o, playing)) { + if(aubio_filterbank_set_power (self->o, power)) { if (PyErr_Occurred() == NULL) { PyErr_SetString (PyExc_ValueError, "error running filterbank.set_power");