Re: [ecasound] full duplex

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] full duplex
From: Kai Vehmanen (
Date: Wed Oct 27 1999 - 23:19:04 EEST

On Wed, 27 Oct 1999, Jeremy Hall wrote:

>> What it doesn't support is opening the same device twice. But as far
> my card has /dev/dsp0 as a read/write device, and/dev/dsp1 as a write-only
> device. These are two separate devices with two separate outputs. What I
> want is to read from /dev/dsp0, then write some stuff back to it.

Hmm, what I wrote above is actually not the whole truth. Ecasound does
in fact support opening the same device twice, if the device supports it
(one process can open the device for reading, while other process can
simultaniously open it for writing). What ecasound doesn't support, is
opening devices in readwrite -mode. Adding support for this is not
easy (ecasound's inputs no nothing about other parts of the system).

What drivers are you using (and what soundcard)? I've done a lot of
multitrack recording with OSS/Linux and ALSA drivers, but not with

> I am seeing delays when I attempt to multitrack record, for example, if I
> have 5 tracks, and I record them in succession, first record track 1. play
> track1 and record track2. play tracks 1&2, record track 3, etc.
> If I take this approach, visible delays occur between track1 and track5.
> The latter tracks always get slower and lag behind the lower numberred
> tracks.
> It appears to be directly related to the buffer size.

Yes, you should definately use _small_ buffersizes. The normal
multitrack-recording situation is:

- processing is started
- soundcard output buffers are filled with data (-b:something
  samples), but processing is not started
- all soundcard devices are triggered at the same time

In theory, this should work, but there's a _lot_ of problems
(soundcard, device driver, kernel, and yes, even ecasound related ;)).
The best compromise is to use small buffersizes. You really should
check Linux audio-quality FAQ at:

If someone has good ideas for better synchronization, I'm listening. ;)

Kai Vehmanen <> -------- CS, University of Turku, Finland
 . - linux audio processing
 . - ambient-idm-rock-... mp3/ra/wav
 . - music&movies (in Finnish)

New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2a24 : Wed Oct 27 1999 - 23:49:49 EEST