Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -102,6 +102,13 @@ Py_pvoc_do(Py_pvoc * self, PyObject * args) · 101 unmodified lines | |||
| 102 | return NULL; | 102 | return NULL; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | if (self->vecin.length != self->hop_s) { | ||
| 106 | PyErr_Format(PyExc_ValueError, | ||
| 107 | "input fvec has length %d, but pvoc expects length %d", | ||
| 108 | self->vecin.length, self->hop_s); | ||
| 109 | return NULL; | ||
| 110 | } | ||
| 111 | |||
| 105 | Py_INCREF(self->output); | 112 | Py_INCREF(self->output); |
| 106 | if (!PyAubio_PyCvecToCCvec (self->output, &(self->c_output))) { | 113 | if (!PyAubio_PyCvecToCCvec (self->output, &(self->c_output))) { |
| 107 | return NULL; | 114 | return NULL; |
| @@ -131,6 +138,13 @@ Py_pvoc_rdo(Py_pvoc * self, PyObject * args) · 23 unmodified lines | |||
| 131 | return NULL; | 138 | return NULL; |
| 132 | } | 139 | } |
| 133 | 140 | ||
| 141 | if (self->cvecin.length != self->win_s / 2 + 1) { | ||
| 142 | PyErr_Format(PyExc_ValueError, | ||
| 143 | "input cvec has length %d, but pvoc expects length %d", | ||
| 144 | self->cvecin.length, self->win_s / 2 + 1); | ||
| 145 | return NULL; | ||
| 146 | } | ||
| 147 | |||
| 134 | Py_INCREF(self->routput); | 148 | Py_INCREF(self->routput); |
| 135 | if (!PyAubio_ArrayToCFvec(self->routput, &(self->c_routput)) ) { | 149 | if (!PyAubio_ArrayToCFvec(self->routput, &(self->c_routput)) ) { |
| 136 | return NULL; | 150 | return NULL; |