Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 1996 23:41:33 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        james@miller.cs.uwm.edu (Jim Lowe)
Cc:        multimedia@freebsd.org, multimedia@rah.star-gate.com, tlehman@becky.acet.org, toml@mitre.org
Subject:   Re: FreeBSD and VAT
Message-ID:  <199601182241.XAA18683@labinfo.iet.unipi.it>
In-Reply-To: <199601182007.OAA10985@miller.cs.uwm.edu> from "Jim Lowe" at Jan 18, 96 02:06:57 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> Usually the sound cards are not even close to 8khz.  They are sometimes
> off by > 1khz depending on the sound card.  Vat doesn't take this into
> consideration.  In fact, Vat uses the sound card for a timer.  It assumes
> that the packets are arriving at 8khz and uses this value, no matter what
> the record rate actually is, as Vat's internal clock.  The block/packet
> size in vat is 160 bytes (or 20ms @ 8khz).

I think there still is a solution, similar to what is used to put
the time-of-day clocks in sync on Unix systems. It must be applied
to the receive side, of course.

Once you see that packets arrive faster than what the sound card
can cope, "compress" packets. If they arrive slower than expected,
"expand" them. Theoretically, compression and expansion should be
done by resampling the data (expensive) but, given the small
differences (1-2 bytes per segment) it probably suffices to
duplicate/clip the last bytes of the packet. It helps if you add
a 1-packet buffer between the network and the audio device, so you
can realize that packets are coming slowly without actually remaining
without data.

	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601182241.XAA18683>