That depends on what you need actually. :) An example of common solution: replace the 'prompt menu loop' with 'wait event', the callback function should trigger the event. Cheers, nanang On 10/04/2008, cingusoft <cingusoft at gmail.com> wrote: > > Hi Nanag > Thanks for your help! > > Only one question. > > With pjmedia_wav_player_set_eof_cb() how is possible to stop the execution. > > I have added a callback function and with a non-PJ_SUCCESS the application > send a silence but don't exit. > Sorruy for this stupid question but I'm very newbie :-). > > Thanks for help > > ------------------------------ > > Message: 2 > Date: Wed, 9 Apr 2008 15:29:34 +0200 > From: "cingusoft" <cingusoft@xxxxxxxxx> > Subject: StreamUtil test > To: <pjsip at lists.pjsip.org> > Message-ID: <017701c89a45$c11fb240$1a04650a at aastra.com> > Content-Type: text/plain; charset="us-ascii" > > > Hi guys > > I'm pjsip newbie, i have tested this fabulous library with StreamUtil.c > example an all work very well. > > My question is > > The wav file is repited on infinite, have a looping or simillary > > How can stop this loop, for example after two loops > > > > Sorry for my poor English > > > > Bye > > > > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080409/ > 25437a41/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Wed, 9 Apr 2008 22:03:45 +0700 > From: "Nanang Izzuddin" <nanang@xxxxxxxxx> > Subject: Re: StreamUtil test > To: "pjsip list" <pjsip at lists.pjsip.org> > Message-ID: > <c7f43120804090803m69b9e9cfh53a261e1221a1400 at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > > You need to modify the code as below: > > - To make it play just once (no loop), you can simply modify the > 'flags' parameter of pjmedia_wav_player_port_create() from 0 to > PJMEDIA_FILE_NO_LOOP > > - To limit the loop once or more, you should provide a callback > function (see pjmedia_wav_player_set_eof_cb()). Every time EOF > condition reached, the callback function will get called. Do counting > inside it, once the desired loop count reached, return non-PJ_SUCCESS > from the callback. > > See pjmedia doc for detail. > > If you want the app quit after playing finished, you will have to > manage to quit from streamutil app. > > > Cheers, > nanang > > > On 09/04/2008, cingusoft <cingusoft at gmail.com> wrote: > > > > > > > > > > Hi guys > > > > I'm pjsip newbie, i have tested this fabulous library with StreamUtil.c > > example an all work very well. > > > > My question is > > > > The wav file is repited on infinite, have a looping or simillary > > > > How can stop this loop, for example after two loops > > > > > > > > Sorry for my poor English > > > > > > > > Bye > > > > > > > > > > > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip at lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > > > > > ------------------------------ > > _______________________________________________ > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > End of pjsip Digest, Vol 8, Issue 29 > ************************************ > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >