Hi Julien,
On Tue, Oct 21, 2008 at 4:22 PM, Julien Claassen <julien(a)c-lab.de> wrote:
1. Does every soundcard have a clock?
Yes, if
under clock we understand a device to measure time intervals.
Because digital audio is a stream of samples every of which represents
a strictly defined time interval.
So every sound card has a clock (used to output samples) and produces
a tick (an interrupt) at least on every buffer boundary.
2. Do other architectures than ALSA offer access to
this clock?
3. Can the soundcard clock probably be accessed via simple device file access?
I have looked into OSS, but didn't find anything there, directly reffering
to clocks.
If OSS or other unix sound drivers don't offer access to this resource, how
would they take care of accuracy?
Frankly speaking, I don't know about ALSA
clock API, but given the
"definition" above,
every audio api (callback-based, at least) does provide an implicit
access to the clock.
So you can measure time intervals with an audio clock, but the
accuracy will be limited
by the buffer size and sampling frequency.
Jack uses audio clock exactly this way, and maps this audio clock to system one
with the use of DLL (delay locked loop).
Sorry, if I didn't asked your question directly.
Regards,
Dmitry.