[Asterisk-Dev] Re: Audio delay in MeetMe using SIP when not 'q' mode

Andrew Lindh asterisk at ntplx.net
Mon Feb 14 15:51:57 MST 2005


>To: asterisk-dev at lists.digium.com
>From: tony at softins.clara.co.uk (Tony Mountifield)
>Date: Mon, 14 Feb 2005 17:58:07 +0000 (UTC)
>Subject: [Asterisk-Dev] Re: Audio delay in MeetMe using SIP when not 'q' mode
>
>In article <cuqnpq$qj9$1 at softins.clara.co.uk>,
>Tony Mountifield <tony at softins.clara.co.uk> wrote:
>> In article <4210DE98.9070302 at starnetworks.us>,
>> Kevin P. Fleming <kpfleming at starnetworks.us> wrote:
>> > Tony Mountifield wrote:
>> > 
>> > > I am suspecting that the problem is something to do with the conf_play()
>> > > of the enter and leave sounds. My guess is that by writing that raw data
>> > > into the pseudo device fd, it causes a backlog that never drains, because
>> > > the device is only getting emptied at the same rate as the conference is
>> > > filling it.
>> > 
>> > That's very interesting... it certainly seems possible that it could be 
>> > the case. It would be pretty simple to test, just replace the "conf 
>> > enter" sound with something quite a bit longer (4 or 5 seconds) and 
>> > determine if the delay increases accordingly.
>> 
>> Well I've tried the next best thing: commented out the careful_write that
>> is in conf_play(). The delay then went away, even on non-q confs.
>
>I've just had an idea how to fix it.
>
>a) Have conf_play() return the length of the data it wrote.
>
>b) Have a variable 'skiplen', and write the ENTER sound as:
>
>    skiplen += conf_play(conf, ENTER);
>
>c) In the main loop, when processing the voice frames, do this:
[code removed]
>This would then throw away the voice bytes that would have occupied the
>space now taken by the Enter sound.
>
>I haven't tested it yet. Will do shortly.
>
>Cheers
>Tony
>-- 

It would be better to overlay/merge the audio rather than just skip it.
Someone could be saying something important at that moment...

The problem has been around for a while. Open a bug report on it and
post your patch there. That way there is a better record of the updates.


  Andrew




More information about the asterisk-dev mailing list