From: Carl Joachim Berdal Haga
<cjhaga@student.matnat.uio.no>
Subject: Re: [Heroines-bcast2000] Full duplex audio synch
To: heroines-bcast2000@lists.sourceforge.net
Date: 09 Sep 2001 16:53:29 +0200
> A few days ago I wrote:
> > I am trying to use bcast2000c for multitrack audio
harddisk
> > recording. It is necessary when laying down
multiple tracks that
> > it is possible to hear what's already recorded and
playing along
> > with that. This is possible and supported with a
full duplex audio
> > card and bcast2000.
> >
> > However, the two tracks are not synchronized.
>
> I have now tried the same experiment on an SB live
card (OSS
> driver), and the results are even worse. On this
system, the newly
> recorded track lags the playback track by about 370ms
(probably
> 16384 samples =
I guessed wrong, but got to the murky bottom at last.
The problem wasn't that a buffer size was
overestimated, but that the mechanism for starting
playback and recording wasn't good enough.
The patch uses the SNDCTL_DSP_SETTRIGGER ioctl for
starting the two. Output from the device is disabled
while the output buffer is filled, then the trigger is
triggered and recording starts at the same time as
playback.
This gets the lag down from 20ms (maestro3) / 370ms (sb
live) to 2ms on both systems. Part of that time is
probably the time for the sound to move through air
between the speaker and the microphone.
Worth noticing: This patch only fixes OSS sound. I
haven't touched the ESound stuff, and I couldn't get
alsa to compile. They should probably be fixed as well.
Apply with "patch -p1" in the bcast-2000c source directory