History

python/ext/py-phasevoc.c: add _set_window

Paul Brossier committed 9 years ago

Commit 965adee1 parent 82f0eff1 file · +19 −0Browse files

Showing the changes to python/ext (1 of 1 file). Show all

Unified · Split

python/ext/py-phasevoc.c+19−0
@@ -155,9 +155,28 @@ Py_pvoc_rdo(Py_pvoc * self, PyObject * args) · 154 unmodified lines
155 return self->routput;155 return self->routput;
156}156}
157 157
158static PyObject *
159Pyaubio_pvoc_set_window (Py_pvoc *self, PyObject *args)
160{
161 uint_t err = 0;
162 char_t *window = NULL;
163
164 if (!PyArg_ParseTuple (args, "s", &window)) {
165 return NULL;
166 }
167 err = aubio_pvoc_set_window (self->o, window);
168
169 if (err > 0) {
170 PyErr_SetString (PyExc_ValueError, "error running aubio_pvoc_set_window");
171 return NULL;
172 }
173 Py_RETURN_NONE;
174}
175
158static PyMethodDef Py_pvoc_methods[] = {176static PyMethodDef Py_pvoc_methods[] = {
159 {"rdo", (PyCFunction) Py_pvoc_rdo, METH_VARARGS,177 {"rdo", (PyCFunction) Py_pvoc_rdo, METH_VARARGS,
160 "synthesis of spectral grain"},178 "synthesis of spectral grain"},
179 {"set_window", (PyCFunction) Pyaubio_pvoc_set_window, METH_VARARGS, ""},
161 {NULL}180 {NULL}
162};181};
163 182

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t