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().<br><br>Example:<br><br>ast_stopstream(chan);<br>res = ast_streamfile(chan, filetoplay, chan->language);<br><br>while ((res = ast_waitfor(chan, -1)) > -1) {<br><br> res = ast_sched_wait(chan->sched);<br><br> Do some stuff ..<br><br> ast_frfree(f);<br> ast_sched_runq(chan->sched);<br><br>}<br><br>I'm not entirely sure of the purpose of these functions but without them the stream won't continue during the loop.<br><br>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?<br><br>Thanks.<br><p>