[Asterisk-Dev] How to implement an audio delay?

Steve Kann stevek at stevek.com
Thu Jan 20 07:22:47 MST 2005


Peter Svensson wrote:

>On Thu, 20 Jan 2005, Tony Mountifield wrote:
>
>  
>
>>The requirement is to put a several-second delay in the audio path from
>>one channel to another. This would naturally be in a situation where
>>communication is one-way. I would envisage reading audio frames into a
>>ring buffer of the required length, and writing them out from the other
>>end of the buffer.
>>    
>>
>
>Perhaps the new jitter buffer implementation could be tweaked to insert 
>that large a delay. If you search the mailing lists and the bug tracker 
>you can get in touch with the people developing the new jitter buffer.
>
>  
>
That would be me -- hopefully other people will join in at some point :)

The jitterbuffer has a buffer like this that you could use for this, and 
you could certainly hack the jitterbuffer so that it thinks there's any 
number of milliseconds of jitter, and it would delay by that amount..

But, I think that, for this application, I'd write an app which takes a 
call, makes a call, and acts as the "bridge" between them, with the 
appropriate buffering of frames. You could call this app_delay, and have 
a dialplan entry like Delay(<destination>, delay), which would make a 
call to <destination> and add the delay specified in delay..



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20050120/0b9dc106/attachment.htm


More information about the asterisk-dev mailing list