[Asterisk-Dev] High resolution timers using POSIX clocks instead
of zaptel
Steve Kann
stevek at stevek.com
Tue Jun 7 11:45:54 MST 2005
Steven wrote:
>On Tue, 2005-06-07 at 13:54 -0400, Steve Kann wrote:
>
>
>>If things are designed well, and you have 100ms of buffering ability on
>>inputs, you can do everything you need to with a 100ms timer; Just
>>process whatever is there at the time.
>>
>>For example, if you have generators generating audio to be sent via
>>VoIP, then you just do it like this:
>>
>>time 0: send nothing.
>>time 100, send frames 0, 20, 40, 60, 80.
>>time 200, send frames 100, 120, 140, 160, 180
>>...
>>
>>Same thing for conferencing, etc.
>>
>>There's some more latency involved in using a longer timer length, but
>>there's also a lot more efficiency, not just from reducing context
>>switches, but also from cache locality, etc.
>>
>>
>
>Ewww, echo. 100ms of input buffer and up to 20-200ms of transmit time
>and you have a pretty nasty time of cleaning up that echo. How deep do
>you think your echo canceler needs to look to clean up the call?
>
>That is a great step backwards for those not on VoIP.
>
>I doubt any efficiency you gain by consolidating your work would be more
>than the extra created echo canceler work load.
>
>
The zaptel ec happens in the kernel driver. It's totally separate and
unrelated to "timers" in asterisk..
And, while I use 100ms as a strawman here, I would really advocate
running most of these timer-related things every 20-40ms or so.
-SteveK
More information about the asterisk-dev
mailing list