ref: f6bfc261fff914a8ff58152fab64a8f3bda68323
parent: 6d41dac050d42aec8f08e27ef49804b85a03e3bf
author: Paul Brossier <piem@piem.org>
date: Sat Nov 17 09:01:56 EST 2018
[py] check for float in filterbank.set_mel_coeffs, improve parameter names
--- a/python/ext/py-filterbank.c
+++ b/python/ext/py-filterbank.c
@@ -181,11 +181,11 @@
{
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 @@
{
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 @@
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");