Changeset 23982aa for python/ext


Ignore:
Timestamp:
May 3, 2016, 5:40:36 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:
a9c33a2
Parents:
fcef3fd
Message:

python/ext/py-fft.c: improve error message, dont delete if not created

File:
1 edited

Legend:

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

    rfcef3fd r23982aa  
    5252  self->o = new_aubio_fft (self->win_s);
    5353  if (self->o == NULL) {
    54     char_t errstr[30];
    55     sprintf(errstr, "error creating fft with win_s=%d", self->win_s);
    56     PyErr_SetString (PyExc_Exception, errstr);
     54    PyErr_Format(PyExc_RuntimeError,
     55        "error creating fft with win_s=%d "
     56        "(should be a power of 2 greater than 1; "
     57        "try recompiling aubio with --enable-fftw3)",
     58        self->win_s);
    5759    return -1;
    5860  }
     
    6971  Py_XDECREF(self->doout);
    7072  Py_XDECREF(self->rdoout);
    71   del_aubio_fft(self->o);
     73  if (self->o) {
     74    del_aubio_fft(self->o);
     75  }
    7276  Py_TYPE(self)->tp_free((PyObject *) self);
    7377}
Note: See TracChangeset for help on using the changeset viewer.