History

[python] fix error messages in filterbank

Paul Brossier committed 8 years ago

Commit b5cec0c1 parent fb1c5e21 file · +3 −3Browse files

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

Unified · Split

python/ext/py-filterbank.c+3−3
@@ -94,7 +94,7 @@ Py_filterbank_do(Py_filterbank * self, PyObject * args) · 93 unmodified lines
94 94
95 if (self->vec.length != self->win_s / 2 + 1) {95 if (self->vec.length != self->win_s / 2 + 1) {
96 PyErr_Format(PyExc_ValueError,96 PyErr_Format(PyExc_ValueError,
97 "input cvec has length %d, but fft expects length %d",97 "input cvec has length %d, but filterbank expects length %d",
98 self->vec.length, self->win_s / 2 + 1);98 self->vec.length, self->win_s / 2 + 1);
99 return NULL;99 return NULL;
100 }100 }
@@ -139,7 +139,7 @@ Py_filterbank_set_triangle_bands (Py_filterbank * self, PyObject *args) · 38 unmodified lines
139 &(self->freqs), samplerate);139 &(self->freqs), samplerate);
140 if (err > 0) {140 if (err > 0) {
141 PyErr_SetString (PyExc_ValueError,141 PyErr_SetString (PyExc_ValueError,
142 "error when setting filter to A-weighting");142 "error when running set_triangle_bands");
143 return NULL;143 return NULL;
144 }144 }
145 Py_RETURN_NONE;145 Py_RETURN_NONE;
@@ -158,7 +158,7 @@ Py_filterbank_set_mel_coeffs_slaney (Py_filterbank * self, PyObject *args) · 12 unmodified lines
158 err = aubio_filterbank_set_mel_coeffs_slaney (self->o, samplerate);158 err = aubio_filterbank_set_mel_coeffs_slaney (self->o, samplerate);
159 if (err > 0) {159 if (err > 0) {
160 PyErr_SetString (PyExc_ValueError,160 PyErr_SetString (PyExc_ValueError,
161 "error when setting filter to A-weighting");161 "error when running set_mel_coeffs_slaney");
162 return NULL;162 return NULL;
163 }163 }
164 Py_RETURN_NONE;164 Py_RETURN_NONE;

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