Changeset eb93592


Ignore:
Timestamp:
Nov 6, 2009, 12:41:39 AM (15 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:
b8ee46c
Parents:
c03e777
Message:

py-cvec.c: cvec.length to return the actual length

File:
1 edited

Legend:

Unmodified
Added
Removed
  • interfaces/python/py-cvec.c

    rc03e777 reb93592  
    2929  self = (Py_cvec *) type->tp_alloc (type, 0);
    3030
    31   self->length = Py_default_vector_length;
     31  self->length = Py_default_vector_length / 2 + 1;
    3232  self->channels = Py_default_vector_channels;
    3333
     
    3737
    3838  if (length > 0) {
    39     self->length = length;
     39    self->length = length / 2 + 1;
    4040  } else if (length < 0) {
    4141    PyErr_SetString (PyExc_ValueError,
     
    5858Py_cvec_init (Py_cvec * self, PyObject * args, PyObject * kwds)
    5959{
    60   self->o = new_cvec (self->length, self->channels);
     60  self->o = new_cvec ((self->length - 1) * 2, self->channels);
    6161  if (self->o == NULL) {
    6262    return -1;
Note: See TracChangeset for help on using the changeset viewer.