[asterisk-dev] sched.c: Request to schedule in the past.

Al Lougher alougher at yahoo.com
Fri May 16 14:48:54 CDT 2008

I've a tweaked version of app_amd that instead of waiting for audio in the receive direction, it begins streaming audio right away. The problem is it's occasionally throwing this error as well as stopping the stream for a second or two then continuing. I think the error is being caused by either ast_sched_wait() or ast_sched_runq().


res = ast_streamfile(chan, filetoplay, chan->language);

while ((res = ast_waitfor(chan, -1)) > -1) {

     res = ast_sched_wait(chan->sched);

     Do some stuff ..



I'm not entirely sure of the purpose of these functions but without them the stream won't continue during the loop.

Any ideas why the sched functions are needed and it's relationship to streaming audio as well as what would cause the error and streaming problems I am seeing?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20080516/824ab366/attachment.htm 

More information about the asterisk-dev mailing list