Module: sems Branch: master Commit: 18aa4abbb62d21c718f89a9ab121c7ed643d9595 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=18aa4abbb62d21c718f89a9ab121c7ed643d9595
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Mon Jul 5 14:33:34 2010 +0200 rewind optionally with time offset --- apps/ivr/IvrAudio.cpp | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/ivr/IvrAudio.cpp b/apps/ivr/IvrAudio.cpp index 12b13d0..1874c03 100644 --- a/apps/ivr/IvrAudio.cpp +++ b/apps/ivr/IvrAudio.cpp @@ -146,7 +146,15 @@ static PyObject* IvrAudioFile_fpopen(IvrAudioFile* self, PyObject* args) static PyObject* IvrAudioFile_rewind(IvrAudioFile* self, PyObject* args) { - self->af->rewind(); + int rew_time; + if(!PyArg_ParseTuple(args,"|i",&rew_time)) + return NULL; + + if (rew_time != 0) + self->af->rewind(rew_time); + else + self->af->rewind(); + Py_INCREF(Py_None); return Py_None; } @@ -229,7 +237,7 @@ static PyMethodDef IvrAudioFile_methods[] = { {"close", (PyCFunction)IvrAudioFile_close, METH_NOARGS, "close the audio file" }, - {"rewind", (PyCFunction)IvrAudioFile_rewind, METH_NOARGS, + {"rewind", (PyCFunction)IvrAudioFile_rewind, METH_VARARGS, "rewind the audio file" }, {"getDataSize", (PyCFunction)IvrAudioFile_getDataSize, METH_NOARGS, _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
