History

Merge branch 'fix/pyextwarnings'

Paul Brossier committed 7 years ago

Commit 36366002 parents 062eaf1 51284ab2 files · +8 −8Browse files

Showing the changes to python (2 of 2 files). Show all

Unified · Split

2 files
  1. python/ext/py-filterbank.c +7 −7
  2. python/ext/py-source.c +1 −1
python/ext/py-filterbank.c+7−7
@@ -122,8 +122,8 @@ Py_filterbank_set_triangle_bands (Py_filterbank * self, PyObject *args) · 121 unmodified lines
122 uint_t err = 0;122 uint_t err = 0;
123 123
124 PyObject *input;124 PyObject *input;
125 uint_t samplerate;125 smpl_t samplerate;
126 if (!PyArg_ParseTuple (args, "OI", &input, &samplerate)) {126 if (!PyArg_ParseTuple (args, "O" AUBIO_NPY_SMPL_CHR, &input, &samplerate)) {
127 return NULL;127 return NULL;
128 }128 }
129 129
@@ -268,9 +268,9 @@ Py_filterbank_get_coeffs (Py_filterbank * self, PyObject *unused) · 138 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 power;271 smpl_t power;
272 272
273 if (!PyArg_ParseTuple (args, "I", &power)) {273 if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR, &power)) {
274 return NULL;274 return NULL;
275 }275 }
276 if(aubio_filterbank_set_power (self->o, power)) {276 if(aubio_filterbank_set_power (self->o, power)) {
@@ -291,12 +291,12 @@ Py_filterbank_set_power(Py_filterbank *self, PyObject *args) · 14 unmodified lines
291static PyObject *291static PyObject *
292Py_filterbank_set_norm(Py_filterbank *self, PyObject *args)292Py_filterbank_set_norm(Py_filterbank *self, PyObject *args)
293{293{
294 uint_t playing;294 smpl_t norm;
295 295
296 if (!PyArg_ParseTuple (args, "I", &playing)) {296 if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR, &norm)) {
297 return NULL;297 return NULL;
298 }298 }
299 if(aubio_filterbank_set_norm (self->o, playing)) {299 if(aubio_filterbank_set_norm (self->o, norm)) {
300 if (PyErr_Occurred() == NULL) {300 if (PyErr_Occurred() == NULL) {
301 PyErr_SetString (PyExc_ValueError,301 PyErr_SetString (PyExc_ValueError,
302 "error running filterbank.set_power");302 "error running filterbank.set_power");
python/ext/py-source.c+1−1
@@ -155,7 +155,7 @@ static char Py_source_doc[] = "" · 154 unmodified lines
155"... for samples in source:\n"155"... for samples in source:\n"
156"... n_frames += len(samples)\n"156"... n_frames += len(samples)\n"
157"... print('read', n_frames, 'samples in', samples.shape[0], 'channels',\n"157"... print('read', n_frames, 'samples in', samples.shape[0], 'channels',\n"
158"... 'from file \"\%s\"' \% source.uri)\n"158"... 'from file \"%%s\"' %% source.uri)\n"
159"...\n"159"...\n"
160"read 239334 samples in 2 channels from file \"audiotrack.wav\"\n"160"read 239334 samples in 2 channels from file \"audiotrack.wav\"\n"
161"\n"161"\n"

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