Changeset 6014dc0


Ignore:
Timestamp:
Apr 30, 2016, 6:20:41 AM (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:
437ef07
Parents:
d03ee4b
Message:

python/ext/py-fft.c: check input has correct size

File:
1 edited

Legend:

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

    rd03ee4b r6014dc0  
    8383
    8484  if (!PyAubio_ArrayToCFvec(input, &(self->vecin))) {
     85    return NULL;
     86  }
     87
     88  if (self->vecin.length != self->win_s) {
     89    PyErr_Format(PyExc_ValueError,
     90                 "input array has length %d, but fft has size %d",
     91                 self->vecin.length, self->win_s);
    8592    return NULL;
    8693  }
Note: See TracChangeset for help on using the changeset viewer.