Re: Soundcard over Network

Jim Gettys (jg@pa.dec.com)
Tue, 4 May 1999 05:15:31 -0700


> From: alan@lxorguk.ukuu.org.uk (Alan Cox)
> Date: Tue, 4 May 1999 12:50:53 +0100 (BST)
> To: goemon@sasami.anime.net (Dan Hollis)
> Cc: jg@pa.dec.com, dmartin@clifton-labs.com, beckerra@rumms.uni-mannheim.de,
> linux-kernel@vger.rutgers.edu
> Subject: Re: Soundcard over Network
> -----
> > On Mon, 3 May 1999, Jim Gettys wrote:
> > > In my (informed) opinion, both NAS and AF have problems that need to
> > > be worked on (though they are good starts).
> >
> > NAS latency is very high, making it unusable for realtime multimedia
> > applications. I recall latencies upwards of 500ms last time I used it.
> >
> > Hopefully AF can do better B)
>
> How well does AF handle multiple physical audio devices being available,
> and can it do synchronization of sound starts with X properties (ie so
> when you pop up a dialog and go 'ding' your streams stay in sync)

AF will support multiple devices (it was developed on a Turbochannel board
we built that had 2 8khz telephone codecs, along with a hi-fi port).
There are some clunky things about this: I came to believe that device
numbers in AF were wrong, and that strings should be associated instead
(e.g. "speaker", "microphone"). This is one of the things I'd fix (it
was too tempting to hard wire numbers into code, and not bother to search
for the device you really wanted to find).

You get explicit control of time in AF (i.e. you can schedule things to
play to a single sample).

As far as tight synchronizing with X, that can/could be done with the X
synchronization extension, if some common time base can be arranged.
(I'm also a co-author of the XSync extension, you might notice).
I believe one ought to be able to get within human perception time,
at least if your system isn't badly loaded. Even without such stuff,
you can do extremely well with devices that let you load a ring buffer,
because AF can "cut through" write to an output ring buffer up until
the instant a sample needs to be played (no FIFOs!).

Either give me a call or we can talk at LE in more detail about
how all of this is supposed to hang together.

For those interested in hacking code, the code for AF can be ftp'ed from
crl.dec.com, in directory "pub/DEC/AF". I was hoping to do a linux port
this spring, but the realities of a one year old and a 4 year old in nursery
school (bringing home ever cold in the universe) have interfered. Given
recent history, best would be someone to go ahead and do a port, and I'll
happily answer questions. Internally, you'll find it looks alot like an
X server, with a simple tasking package added (funny thing about that).
Start by reading the Usenix paper/tech report to give background.
AF has an X style copyright: I'd appreciate if it remained that way.

- Jim Gettys

--
Jim Gettys
Industry Standards and Consortia
Compaq Computer Corporation
Visting Scientist, World Wide Web Consortium, M.I.T.
http://www.w3.org/People/Gettys/
jg@w3.org, jg@pa.dec.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/