[Asterisk-Users] Re: TDM users: modified zttest.c for testing

Tony Mountifield tony at softins.clara.co.uk
Tue May 3 10:21:02 MST 2005


In article <Chameleon.1115133799.adar0 at vegas>,
Rich Adamson <radamson at routers.com> wrote:
> 
> It would be very interesting to see everyone's results in running
> this, and even more interesting to report the results with the OS
> distro in use, mobo in use (if known), etc. If anyone actually
> get's a result that is very close to 1.000 seconds, I'd really
> like to know more about those systems. (email off list is fine
> if you want.)

Details below; Fedora Core 1. I also tried using "nice" to raise the
process priority, but it made no difference.

[root at softins zaptel]# ./zttest-mod -v
Objective: to read 8192 bytes from TDM card in 1.000000 seconds.
Opened pseudo zap interface, measuring accuracy...

8192 bytes in 1.023981 seconds
8192 bytes in 1.023995 seconds
8192 bytes in 1.023992 seconds
8192 bytes in 1.023996 seconds
8192 bytes in 1.023991 seconds
8192 bytes in 1.023994 seconds
8192 bytes in 1.023992 seconds
8192 bytes in 1.023994 seconds
8192 bytes in 1.024003 seconds
8192 bytes in 1.023986 seconds
8192 bytes in 1.023992 seconds
8192 bytes in 1.023993 seconds
8192 bytes in 1.023994 seconds
8192 bytes in 1.023993 seconds
8192 bytes in 1.023993 seconds
8192 bytes in 1.023995 seconds
8192 bytes in 1.023992 seconds
8192 bytes in 1.023995 seconds
8192 bytes in 1.023992 seconds
8192 bytes in 1.023993 seconds
--- Results after 20 passes ---
Best: 1.024003 -- Worst: 1.023981 -- Average: 1.023993

This looks very close to 1024ms instead of 1000ms. That got me thinking:

I believe your premise is wrong. The sample rate of telephony audio
is 8kHz. With 8-bit samples (uLaw or aLaw), that means 8000 bytes
should be supplied in 1 second, not 8192.

At a rate of 8000 bytes/sec, 8192 bytes will arrive in 1.024 seconds.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list