Ignore:
Timestamp:
Apr 21, 2016, 9:31:10 PM (8 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:
a7f398d
Parents:
bfe8256
Message:

ext/: use new proxy functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/aubiomodule.c

    rbfe8256 rb5bef11  
    9696  }
    9797
    98   vec = PyAubio_ArrayToCFvec (input);
    99 
    100   if (vec == NULL) {
     98  vec = (fvec_t *)malloc(sizeof(fvec_t));
     99  if (!PyAubio_ArrayToCFvec(input, vec)) {
     100    free(vec);
    101101    return NULL;
    102102  }
     
    104104  // compute the function
    105105  result = Py_BuildValue ("f", fvec_alpha_norm (vec, alpha));
     106  free(vec);
    106107  if (result == NULL) {
    107108    return NULL;
     
    186187  }
    187188
    188   vec = PyAubio_ArrayToCFvec (input);
    189 
    190   if (vec == NULL) {
     189  vec = (fvec_t *)malloc(sizeof(fvec_t));
     190  if (!PyAubio_ArrayToCFvec(input, vec)) {
     191    free(vec);
    191192    return NULL;
    192193  }
     
    194195  // compute the function
    195196  result = Py_BuildValue ("f", aubio_zero_crossing_rate (vec));
     197  free(vec);
    196198  if (result == NULL) {
    197199    return NULL;
     
    215217  }
    216218
    217   vec = PyAubio_ArrayToCFvec (input);
    218 
    219   if (vec == NULL) {
     219  vec = (fvec_t *)malloc(sizeof(fvec_t));
     220  if (!PyAubio_ArrayToCFvec(input, vec)) {
     221    free(vec);
    220222    return NULL;
    221223  }
Note: See TracChangeset for help on using the changeset viewer.