On Sunday 15 August 2004 04:36 am, Steve Harris wrote:
On Sat, Aug 14, 2004 at 11:39:48 -0400, John Check
wrote:
I
don't think raw ethernet will buy us anything over using UDP. These
few usecs less simply won't matter.
(but with ethernet you would have the disadvantage that you loose
routability)
It probably wouldn't be the best idea to have an audio system on any kind
of accessible network anyway. Switches or even bridged ethernet would do
the trick for a cluster of audio processing hosts.
But if youre going to do that, why use ethernet? You'd need dedicated NICs
Why climb a mountain? If you want to find reasons not to do something it's
easy.
and switches, so you may as well use firewire, which
has dedicated
realtime channels, more bandwidth and doesnt require switching. 400meg
Firewire cards are down to about 7 or 8 euros in the UK now.
Good idea, but ethernet is still an adequate low cost option. I have code to
do it over ethernet that I've yet to test and it doesn't require me spending
a penny (stop giggling).
The only disadvantage is that you can't (right
now) cheaply run firewire
over long distances, but taht will change once firewire over CAT5 cards
come down in price, and this is rarely an issue with clusters anyway.
I agree. It's either a problem or it isn't.
> In that
case I guess sample skipping/duplication (from time to time) is
> the way to go.
> It's not hard to do but the hard thing is to keep buffers small and
> have the algorithm react fast to eventual drifts in sample rate.
> I measured the sample rate of some consumer (44100Hz) audio cards and
> usually it is quite stable but it varies
> 3-4 samples from card to card.
> eg card1 had 44096Hz , card2 44098Hz
> so assuming we use 128 frames buffers
> and the samplerate delta between cards is 2 samples we must insert/skip
> 2 samples per second in one of the cards.
> which means insert/skip a sample in one of each 172 buffers (of
> 128frames each) processed.
>
> Any good suggestion how to best implement it ?
You can't just duplicate or drop samples, it will sound terrible. You need
to do some resampling. For clusters this shouldn't be an issue, just
make one device be the i/o machine and sync everything else off that.
If you absolutly have to have multiple machines doing i/o then you will
need some complicated resampling stuff. Fons has been working on it, to
allow soft-sync between 2 jack systems, but I've not tried it yet.
- Steve