Changeset 11b49d7 for python/ext
- Timestamp:
- Sep 21, 2014, 2:42:08 AM (10 years ago)
- 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:
- 74dcddb
- Parents:
- 24931d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-source.c
r24931d5 r11b49d7 69 69 "\n" 70 70 "Close this source now."; 71 72 static char Py_source_seek_doc[] = "" 73 "x.seek(position)\n" 74 "\n" 75 "Seek to resampled frame position."; 71 76 72 77 static PyObject * … … 236 241 { 237 242 aubio_source_close (self->o); 243 Py_RETURN_NONE; 244 } 245 246 static PyObject * 247 Pyaubio_source_seek (Py_source *self, PyObject *args) 248 { 249 uint_t err = 0; 250 251 uint_t position; 252 if (!PyArg_ParseTuple (args, "I", &position)) { 253 return NULL; 254 } 255 256 err = aubio_source_seek(self->o, position); 257 if (err != 0) { 258 PyErr_SetString (PyExc_ValueError, 259 "error when seeking in source"); 260 return NULL; 261 } 238 262 Py_RETURN_NONE; 239 263 } … … 250 274 {"close", (PyCFunction) Pyaubio_source_close, 251 275 METH_NOARGS, Py_source_close_doc}, 276 {"seek", (PyCFunction) Pyaubio_source_seek, 277 METH_VARARGS, Py_source_seek_doc}, 252 278 {NULL} /* sentinel */ 253 279 };
Note: See TracChangeset
for help on using the changeset viewer.