Changeset 0f045b2


Ignore:
Timestamp:
Dec 5, 2009, 1:45:08 AM (14 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:
b7f3aaf
Parents:
96fe713
Message:

interfaces/python: towards mono (setup.py and py-phasevoc.c)

Location:
interfaces/python
Files:
2 edited

Legend:

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

    r96fe713 r0f045b2  
    33static char Py_pvoc_doc[] = "pvoc object";
    44
    5 AUBIO_DECLARE(pvoc, uint_t win_s; uint_t hop_s; uint_t channels)
     5AUBIO_DECLARE(pvoc, uint_t win_s; uint_t hop_s)
    66
    77//AUBIO_NEW(pvoc)
     
    99Py_pvoc_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
    1010{
    11   int win_s = 0, hop_s = 0, channels = 0;
     11  int win_s = 0, hop_s = 0;
    1212  Py_pvoc *self;
    13   static char *kwlist[] = { "win_s", "hop_s", "channels", NULL };
     13  static char *kwlist[] = { "win_s", "hop_s", NULL };
    1414
    15   if (!PyArg_ParseTupleAndKeywords (args, kwds, "|III", kwlist,
    16           &win_s, &hop_s, &channels)) {
     15  if (!PyArg_ParseTupleAndKeywords (args, kwds, "|II", kwlist,
     16          &win_s, &hop_s)) {
    1717    return NULL;
    1818  }
     
    2626  self->win_s = Py_default_vector_length;
    2727  self->hop_s = Py_default_vector_length/2;
    28   self->channels = Py_default_vector_channels;
    2928
    3029  if (self == NULL) {
     
    4847  }
    4948
    50   if (channels > 0) {
    51     self->channels = channels;
    52   } else if (channels < 0) {
    53     PyErr_SetString (PyExc_ValueError,
    54         "can not use negative number of filters");
    55     return NULL;
    56   }
    57 
    5849  return (PyObject *) self;
    5950}
    6051
    6152
    62 AUBIO_INIT(pvoc, self->win_s, self->hop_s, self->channels)
     53AUBIO_INIT(pvoc, self->win_s, self->hop_s)
    6354
    6455AUBIO_DEL(pvoc)
     
    8273
    8374  output = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
    84   output->channels = vec->channels;
    8575  output->length = ((Py_pvoc *) self)->win_s;
    86   output->o = new_cvec(((Py_pvoc *) self)->win_s, vec->channels);
     76  output->o = new_cvec(((Py_pvoc *) self)->win_s);
    8777
    8878  // compute the function
     
    9888  {"hop_s", T_INT, offsetof (Py_pvoc, hop_s), READONLY,
    9989    "size of the hop"},
    100   {"channels", T_INT, offsetof (Py_pvoc, channels), READONLY,
    101     "number of channels"},
    10290AUBIO_MEMBERS_STOP(pvoc)
    10391
     
    120108
    121109  output = (Py_fvec*) PyObject_New (Py_fvec, &Py_fvecType);
    122   output->channels = vec->channels;
    123110  output->length = ((Py_pvoc *) self)->hop_s;
    124   output->o = new_fvec(output->length, output->channels);
     111  output->o = new_fvec(output->length);
    125112
    126113  // compute the function
  • interfaces/python/setup.py

    r96fe713 r0f045b2  
    1111            ["aubiomodule.c",
    1212            "py-fvec.c",
     13            "py-fmat.c",
    1314            "py-cvec.c",
    1415            "py-filter.c",
Note: See TracChangeset for help on using the changeset viewer.