ref: 965adee4bf9ec7b241b59b53e0e26cd2b02d0cb6
parent: 82f0effdabd88079cff6e6a6b3f1aded444c4476
author: Paul Brossier <piem@piem.org>
date: Wed Sep 6 10:01:51 EDT 2017
python/ext/py-phasevoc.c: add _set_window
--- a/python/ext/py-phasevoc.c
+++ b/python/ext/py-phasevoc.c
@@ -155,9 +155,28 @@
return self->routput;
}
+static PyObject *
+Pyaubio_pvoc_set_window (Py_pvoc *self, PyObject *args)
+{
+ uint_t err = 0;
+ char_t *window = NULL;
+
+ if (!PyArg_ParseTuple (args, "s", &window)) {
+ return NULL;
+ }
+ err = aubio_pvoc_set_window (self->o, window);
+
+ if (err > 0) {
+ PyErr_SetString (PyExc_ValueError, "error running aubio_pvoc_set_window");
+ return NULL;
+ }
+ Py_RETURN_NONE;
+}
+
static PyMethodDef Py_pvoc_methods[] = {
{"rdo", (PyCFunction) Py_pvoc_rdo, METH_VARARGS,
"synthesis of spectral grain"},
+ {"set_window", (PyCFunction) Pyaubio_pvoc_set_window, METH_VARARGS, ""},
{NULL}
};