Changeset f6bfc26


Ignore:
Timestamp:
Nov 17, 2018, 2:01:56 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
69dbe0a
Parents:
6d41dac
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-filterbank.c

    r6d41dac rf6bfc26  
    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  }
     
    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  }
     
    269269Py_filterbank_set_power(Py_filterbank *self, PyObject *args)
    270270{
    271   uint_t playing;
    272 
    273   if (!PyArg_ParseTuple (args, "I", &playing)) {
    274     return NULL;
    275   }
    276   if(aubio_filterbank_set_power (self->o, playing)) {
     271  uint_t power;
     272
     273  if (!PyArg_ParseTuple (args, "I", &power)) {
     274    return NULL;
     275  }
     276  if(aubio_filterbank_set_power (self->o, power)) {
    277277    if (PyErr_Occurred() == NULL) {
    278278      PyErr_SetString (PyExc_ValueError,
Note: See TracChangeset for help on using the changeset viewer.