History

Merge branch 'master' into feature/cdocstrings

Paul Brossier committed 8 years ago

Commit 81abf912 parents 92948ab 4bc10e230 files · +362 −101Browse files

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

Unified · Split

2 files
  1. python/ext/aubiomodule.c +12 −4
  2. python/ext/py-filterbank.c +3 −3
python/ext/aubiomodule.c+12−4
@@ -237,7 +237,9 @@ Py_bintomidi (PyObject * self, PyObject * args) · 236 unmodified lines
237 smpl_t input, samplerate, fftsize;237 smpl_t input, samplerate, fftsize;
238 smpl_t output;238 smpl_t output;
239 239
240 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR , &input, &samplerate, &fftsize)) {240 if (!PyArg_ParseTuple (args,
241 "" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR,
242 &input, &samplerate, &fftsize)) {
241 return NULL;243 return NULL;
242 }244 }
243 245
@@ -252,7 +254,9 @@ Py_miditobin (PyObject * self, PyObject * args) · 8 unmodified lines
252 smpl_t input, samplerate, fftsize;254 smpl_t input, samplerate, fftsize;
253 smpl_t output;255 smpl_t output;
254 256
255 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR , &input, &samplerate, &fftsize)) {257 if (!PyArg_ParseTuple (args,
258 "" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR,
259 &input, &samplerate, &fftsize)) {
256 return NULL;260 return NULL;
257 }261 }
258 262
@@ -267,7 +271,9 @@ Py_bintofreq (PyObject * self, PyObject * args) · 8 unmodified lines
267 smpl_t input, samplerate, fftsize;271 smpl_t input, samplerate, fftsize;
268 smpl_t output;272 smpl_t output;
269 273
270 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, &input, &samplerate, &fftsize)) {274 if (!PyArg_ParseTuple (args,
275 "" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR,
276 &input, &samplerate, &fftsize)) {
271 return NULL;277 return NULL;
272 }278 }
273 279
@@ -282,7 +288,9 @@ Py_freqtobin (PyObject * self, PyObject * args) · 8 unmodified lines
282 smpl_t input, samplerate, fftsize;288 smpl_t input, samplerate, fftsize;
283 smpl_t output;289 smpl_t output;
284 290
285 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, &input, &samplerate, &fftsize)) {291 if (!PyArg_ParseTuple (args,
292 "" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR,
293 &input, &samplerate, &fftsize)) {
286 return NULL;294 return NULL;
287 }295 }
288 296
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