Beispiel #1
0
aubio_filter_t *
new_aubio_filter_biquad (lsmp_t b0, lsmp_t b1, lsmp_t b2, lsmp_t a1, lsmp_t a2)
{
  aubio_filter_t *f = new_aubio_filter (3);
  aubio_filter_set_biquad (f, b0, b1, b2, a1, a2);
  return f;
}
Beispiel #2
0
static PyObject *
Py_filter_set_biquad(Py_filter * self, PyObject *args)
{
  uint_t err = 0;
  lsmp_t b0, b1, b2, a1, a2;
  if (!PyArg_ParseTuple (args, "ddddd", &b0, &b1, &b2, &a1, &a2)) {
    return NULL;
  }

  err = aubio_filter_set_biquad (self->o, b0, b1, b2, a1, a2);
  if (err > 0) {
    PyErr_SetString (PyExc_ValueError,
        "error when setting filter with biquad coefficients");
    return NULL;
  }
  Py_RETURN_NONE;
}