Changeset cd766bc


Ignore:
Timestamp:
Jul 17, 2012, 2:53:51 AM (12 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:
db8000e
Parents:
3ff62e9 (diff), a81c8cd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'develop' into io

File:
1 edited

Legend:

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

    r3ff62e9 rcd766bc  
    121121}
    122122
     123static PyObject *
     124Py_filter_set_biquad(Py_filter * self, PyObject *args)
     125{
     126  uint_t err = 0;
     127  lsmp_t b0, b1, b2, a1, a2;
     128  if (!PyArg_ParseTuple (args, "ddddd", &b0, &b1, &b2, &a1, &a2)) {
     129    return NULL;
     130  }
     131
     132  err = aubio_filter_set_biquad (self->o, b0, b1, b2, a1, a2);
     133  if (err > 0) {
     134    PyErr_SetString (PyExc_ValueError,
     135        "error when setting filter with biquad coefficients");
     136    return NULL;
     137  }
     138  return Py_None;
     139}
     140
    123141static PyMemberDef Py_filter_members[] = {
    124142  // TODO remove READONLY flag and define getter/setter
     
    133151  {"set_a_weighting", (PyCFunction) Py_filter_set_a_weighting, METH_VARARGS,
    134152      "set filter coefficients to A-weighting"},
     153  {"set_biquad", (PyCFunction) Py_filter_set_biquad, METH_VARARGS,
     154      "set b0, b1, b2, a1, a2 biquad coefficients"},
    135155  {NULL}
    136156};
Note: See TracChangeset for help on using the changeset viewer.