Changeset b055b4e for python/ext


Ignore:
Timestamp:
Apr 29, 2016, 9:57:35 PM (9 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, pitchshift, sampler, timestretch, yinfft+
Children:
21e8408
Parents:
307fdfc
Message:

python/ext/py-filterbank.c: use new_py_fvec

File:
1 edited

Legend:

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

    r307fdfc rb055b4e  
    1212  fvec_t freqs;
    1313  fmat_t coeffs;
    14   fvec_t *out;
     14  PyObject *out;
     15  fvec_t c_out;
    1516} Py_filterbank;
    1617
     
    6566    return -1;
    6667  }
    67   self->out = new_fvec(self->n_filters);
     68  self->out = new_py_fvec(self->n_filters);
    6869
    6970  return 0;
     
    7475{
    7576  del_aubio_filterbank(self->o);
    76   del_fvec(self->out);
     77  Py_DECREF(self->out);
    7778  free(self->coeffs.data);
    7879  Py_TYPE(self)->tp_free((PyObject *) self);
     
    9293  }
    9394
     95  Py_INCREF(self->out);
     96  if (!PyAubio_ArrayToCFvec(self->out, &(self->c_out))) {
     97    return NULL;
     98  }
    9499  // compute the function
    95   aubio_filterbank_do (self->o, &(self->vec), self->out);
    96   return (PyObject *)PyAubio_CFvecToArray(self->out);
     100  aubio_filterbank_do (self->o, &(self->vec), &(self->c_out));
     101  return self->out;
    97102}
    98103
Note: See TracChangeset for help on using the changeset viewer.