[Asterisk-Dev] libiax2 OK for production?

Bruno Hertz brrhtz at yahoo.de
Mon Jan 31 18:19:17 MST 2005


On Mon, 2005-01-31 at 20:00 -0500, Steve Kann wrote:

> I haven't examined all the code, but I'm pretty sure the major 
> parameters of what they're doing should be similar:
> 
> They both use OSS
> They both set the card to 8khz mono
> They both set the card to full-duplex.

All true, but the main point was implicitly mentioned by yourself here
http://sourceforge.net/mailarchive/message.php?msg_id=7258386
and the link you enclosed.

I.e. what you wrote there about Windows variants applies to Linux as
well. What this is basically about is the OSS fragment size and number,
i.e. the soundcard/driver buffer setup, and it has a significant impact
on latency, at least for certain card/driver variants (you might want to
add that to your FAQ, btw). Mine is SB Ensoniq 5880 AudioPCI with
alsa driver snd_ens1371.

Anyway, the portaudio developers apparently were conscious of this
point and introduced an environment variable PA_MIN_LATENCY_MSEC,
with which the buffer setup can be controlled. Default is 200 msec,
and I use 10. This results in a pretty decent setting (one can check
the setup via /proc/asound/card0/pcm0p/sub0/hw_params resp.
/proc/asound/card0/pcm0c/sub0/hw_params .

Anyway, in response to Steve Underwood, even with those optimized
settings I have latency, about 1 sec. There must be another reason,
it might be due to my platform (FC3), but I wouldn't bet on it.

What I know is that miniphone, with it's simplistic main select loop,
gives me way better performance.

I tested all that with * echo tests btw, with two servers. One on my
LAN with ping 3msec or so, and one on the internet with ping 40msec.
Miniphone with internet * is significantly better than iaxcomm on LAN.

Thanks, Bruno.





More information about the asterisk-dev mailing list