[ecasound] sync-related issues

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [ecasound] sync-related issues
From: John Denker (jsd_AT_research.att.com)
Date: Tue Nov 06 2001 - 17:02:16 EET


Hi --

Background: We are doing simultaneous play+record operations. We need
precise sync. We are using hardware that is capable of exact sync (Midiman
Delta 1010) but ecasound doesn't support hardware sync.

1) Using ecasound v2.1dev2 we observe that there is "usually" exact sync,
but in about 5% of the runs it is off by one sample. That's 22
microseconds (when using 44100 Hz sampling).

We hypothesize that the "sync fix" timing information is kept to
microsecond precision, which would explain why roughly 1 time in 22 there
would be an error.

Whatever the reason, a 5% sync failure is, for us, equivalent to no sync at
all. That means that about 9% of the time, this run is different from the
previous run. That's not reliable enough. If we had an error on the order
of 1 microsecond every time, we could probably live with it. An error of
22 microseconds 5% of the time is the same "average" error but we can't
live with that.

<digression topic=latency>
2) Using ecasound v2.1dev2 we observe a 2-second latency when the record
thread starts up. Apparently it is prefilling some internal buffers. We
can't tolerate that kind of latency. We could tolerate a millisecond or
so, but we don't understand why even that should be necessary. The "sync
fix" as reported by ecasound is observed to be 10, 11, or 12 microseconds.
We don't understand why the latency should be 10^5 times larger than this.

Latency was OK in version 2.0 -- but it's alarming when the new version
works worse than the old version. Is there any way to make this problem go
away?
</digression>

3) Returning to the sync issue: We can imagine three options, in order of
preference:
   a) Hardware sync
   b) Software sync, like ecasound does now, only more accurate, and with
no significant latency.
   c) Loopback

Comments and questions:
  a) We would be delighted to have a sound-processing program with support
for hardware sync. We looked at ardour but it doesn't appear to be ready
for prime time yet. Is there any chance of getting ecasound to do this?
Is anybody working on this?
  b) Is there any chance of getting super-good software sync?
  c) As it stands now, it looks like our best option is to turn off all the
software sync features and rely on loopback. That is, sacrifice one
channel of the sound card to play+record a coded signal and measure what
comes back. This seems like a horrible kludge. It is not a good use of
hardware, and it is not a good use of programming resources, especially if
a better solution (hardware sync) is theoretically available.

Can anybody provide any guidance on how we should proceed?

Thanks -- jsd

--
To unsubscribe send message 'unsubscribe' in the body of the
message to <ecasound-list-request_AT_wakkanet.fi>.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Nov 06 2001 - 16:58:21 EET