From: Carl Joachim Berdal Haga <cjhaga@st...> - 2001-09-09 14:53:38
> 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.
I'll put the patch on sourceforge. Are the sourceforge patches ever
integrated into the mainline, or must everybody apply them to the
Get latest updates about Open Source Projects, Conferences and News.