History

[py] check for float in filterbank.set_mel_coeffs, improve parameter names

Paul Brossier committed 7 years ago

Commit f6bfc261 parent 6d41dac1 file · +9 −9Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/ext/py-filterbank.c+9−9
@@ -181,11 +181,11 @@ Py_filterbank_set_mel_coeffs (Py_filterbank * self, PyObject *args) · 180 unmodified lines
181181 {
182182 uint_t err = 0;
183183
184− uint_t samplerate;
184+ smpl_t samplerate;
185185 smpl_t freq_min;
186186 smpl_t freq_max;
187− if (!PyArg_ParseTuple (args, "I" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR,
188− &samplerate, &freq_min, &freq_max)) {
187+ if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR
188+ AUBIO_NPY_SMPL_CHR, &samplerate, &freq_min, &freq_max)) {
189189 return NULL;
190190 }
191191
@@ -210,11 +210,11 @@ Py_filterbank_set_mel_coeffs_htk (Py_filterbank * self, PyObject *args) · 18 unmodified lines
210210 {
211211 uint_t err = 0;
212212
213− uint_t samplerate;
213+ smpl_t samplerate;
214214 smpl_t freq_min;
215215 smpl_t freq_max;
216− if (!PyArg_ParseTuple (args, "I" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR,
217− &samplerate, &freq_min, &freq_max)) {
216+ if (!PyArg_ParseTuple (args, AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR
217+ AUBIO_NPY_SMPL_CHR, &samplerate, &freq_min, &freq_max)) {
218218 return NULL;
219219 }
220220
@@ -268,12 +268,12 @@ Py_filterbank_get_coeffs (Py_filterbank * self, PyObject *unused) · 47 unmodified lines
268268 static PyObject *
269269 Py_filterbank_set_power(Py_filterbank *self, PyObject *args)
270270 {
271− uint_t playing;
271+ uint_t power;
272272
273− if (!PyArg_ParseTuple (args, "I", &playing)) {
273+ if (!PyArg_ParseTuple (args, "I", &power)) {
274274 return NULL;
275275 }
276− if(aubio_filterbank_set_power (self->o, playing)) {
276+ if(aubio_filterbank_set_power (self->o, power)) {
277277 if (PyErr_Occurred() == NULL) {
278278 PyErr_SetString (PyExc_ValueError,
279279 "error running filterbank.set_power");

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