[PlanetCCRMA] Re: Mulitple Jack audio interfaces (was Tascam US-122 audio problem)

Andrew Burgess aab@cichlid.com
Sun Feb 27 07:56:01 2005

>NON-argumentatively =>?But how can you know? If you are using the
>system clock to get time of day info then you are depending on another
>crystal source which has another 100ppm bit of uncertainty. You don't
>know if it's running fast or slow.

It turns out that it doesn't matter. You are computing the
difference in rates between source and dest, the accuracy of
the gettimeofday doesn't enter into it (or rather it enters
into both calculations in exactly the same way so gets
divided out)

Your point would be valid if using two different machines
and thus two different gettimeofday xtals but in that case
you just measure the rate when it enters one machine
regardless if it was from a local soundcard or the network.

Even changes in gettimeofday from NTP corrections would only
cause small errors since it happens to both calculations.

>OK, so the fast side when receiving will delete samples and the slow
>side when receiving will add samples. You might even make a decision
>to not add samples until the offset gets larger than some amount so
>that you're not doing this too often. You might also not add or delete
>the total number of samples required every second but rather create an
>offset direction that says 'You're 10 samples ahead right now so
>delete 2 or your 50 samples ahead so delete 10'. That way the changes
>happen a bit more randomly and maybe aren't so noticeable. 

Yes, except I'd try to never do two samples at once, spacing them
out should be less audible.

>Who knows?

Not me. Have to experiment ;-)

>I contend that you'll never have a good
>number for the actual sample rate.

I wouldn't bet against you but I'll take a stab at it

>please consider this case:

>You transfer from machine A to machine B on day X. The recorded audio
>after you processing is stored. You then record the same audio from
>machine A on machine B on day Y. You then play the two audio streams
>against each other. You almost certainly are going to hear phasing as
>the differences on different days are not identical and the position
>fo the audio in the stream is going ot move around. I think there are
>many cases where this sort of problem will kill the use of this
>technology, but that's just my thought.

I hadn't considered that. For my application, no recording
is done. However I wonder if a music session would be a
short enought duration to make this inaudible. How many
samples of phase difference are audible?

I'm not a musician. My application is home automation, and
the particular problem I'm trying to solve is a USB FM radio
with an analog output, running that to one soundcard and
then allow it to se sent to an arbitrary room which may be
on a different soundcard.

Before I started working on this I would get an xrun every
few minutes and drop an entire period.

>It's an intersting problem for sure. I hope you find an acceptable answer.

Me too :-)

Thanks for sharing your thinking Mark.

Sorry for the OT everyone.