ref: 36366004ce6ebc53d98c4a0b1dc6fb95b98e8023
parent: 062eaf1c8cf375e4cb3bcdd7b0b95d575fd4707d
parent: 51284ab5672c06c6854121b31280ac08920c7572
author: Paul Brossier <piem@piem.org>
date: Tue Nov 20 20:53:41 EST 2018
Merge branch 'fix/pyextwarnings'
--- a/python/ext/py-filterbank.c
+++ b/python/ext/py-filterbank.c
@@ -122,8 +122,8 @@
uint_t err = 0;
PyObject *input;
- uint_t samplerate;
- if (!PyArg_ParseTuple (args, "OI", &input, &samplerate)) {
+ smpl_t samplerate;
+ if (!PyArg_ParseTuple (args, "O" AUBIO_NPY_SMPL_CHR, &input, &samplerate)) {
return NULL;
}
@@ -268,9 +268,9 @@
static PyObject *
Py_filterbank_set_power(Py_filterbank *self, PyObject *args)
{
- uint_t power;
+ smpl_t power;
- if (!PyArg_ParseTuple (args, "I", &power)) {
+ if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR, &power)) {
return NULL;
}
if(aubio_filterbank_set_power (self->o, power)) {
@@ -291,12 +291,12 @@
static PyObject *
Py_filterbank_set_norm(Py_filterbank *self, PyObject *args)
{
- uint_t playing;
+ smpl_t norm;
- if (!PyArg_ParseTuple (args, "I", &playing)) {
+ if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR, &norm)) {
return NULL;
}
- if(aubio_filterbank_set_norm (self->o, playing)) {
+ if(aubio_filterbank_set_norm (self->o, norm)) {
if (PyErr_Occurred() == NULL) {
PyErr_SetString (PyExc_ValueError,
"error running filterbank.set_power");
--- a/python/ext/py-source.c
+++ b/python/ext/py-source.c
@@ -155,7 +155,7 @@
"... for samples in source:\n"
"... n_frames += len(samples)\n"
"... print('read', n_frames, 'samples in', samples.shape[0], 'channels',\n"
-"... 'from file \"\%s\"' \% source.uri)\n"
+"... 'from file \"%%s\"' %% source.uri)\n"
"...\n"
"read 239334 samples in 2 channels from file \"audiotrack.wav\"\n"
"\n"