[py] fix filterbank in double-precision mode
authorPaul Brossier <piem@piem.org>
Tue, 20 Nov 2018 23:22:39 +0000 (00:22 +0100)
committerPaul Brossier <piem@piem.org>
Tue, 20 Nov 2018 23:22:39 +0000 (00:22 +0100)
python/ext/py-filterbank.c

index 99cf466..22f2a56 100644 (file)
@@ -123,7 +123,7 @@ Py_filterbank_set_triangle_bands (Py_filterbank * self, PyObject *args)
 
   PyObject *input;
   smpl_t samplerate;
 
   PyObject *input;
   smpl_t samplerate;
-  if (!PyArg_ParseTuple (args, "Of", &input, &samplerate)) {
+  if (!PyArg_ParseTuple (args, "O" AUBIO_NPY_SMPL_CHR, &input, &samplerate)) {
     return NULL;
   }
 
     return NULL;
   }
 
@@ -270,7 +270,7 @@ Py_filterbank_set_power(Py_filterbank *self, PyObject *args)
 {
   smpl_t power;
 
 {
   smpl_t power;
 
-  if (!PyArg_ParseTuple (args, "f", &power)) {
+  if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR, &power)) {
     return NULL;
   }
   if(aubio_filterbank_set_power (self->o, power)) {
     return NULL;
   }
   if(aubio_filterbank_set_power (self->o, power)) {
@@ -293,7 +293,7 @@ Py_filterbank_set_norm(Py_filterbank *self, PyObject *args)
 {
   smpl_t norm;
 
 {
   smpl_t norm;
 
-  if (!PyArg_ParseTuple (args, "f", &norm)) {
+  if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR, &norm)) {
     return NULL;
   }
   if(aubio_filterbank_set_norm (self->o, norm)) {
     return NULL;
   }
   if(aubio_filterbank_set_norm (self->o, norm)) {