Re: [linux-audio-dev] App intercomunication issues, some views.

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

Subject: Re: [linux-audio-dev] App intercomunication issues, some views.
From: Martijn Sipkema (msipkema_AT_sipkema-digital.com)
Date: Wed Jul 24 2002 - 01:07:15 EEST


[...]
> UST = Unadjusted System Time
>
> I haven\'t seen any implementations of UST where you could specify a
> different source of the clock tick than the system clock/cycle timer.

Well, no. Is this needed. The UST should just be an accurate unadjusted
clock that can be used for timestamping/scheduling events.

> >audio by scheduling it on UST. An application doing JACK audio output
> >and MIDI output would most likely estimate the UST for the output buffer
> >using the UST of the input buffer and schedule MIDI messages for that
> >buffer in the callback also. So this then looks much like your proposal.
> >But there is also still the ability to use send MIDI messages for
> >immediate transmission.
>
> Well, thats actually what we have in JACK already, if the client uses
> the ALSA sequencer in another (non-JACK) thread. its precisely the
> design i have in my head for Ardour, for example.

But JACK doesn\'t provide timestamps, or does it?

> >Using UST would also enable syncing to video or some other media
> >stream without it all residing in the same API.
>
> Something has to connect the UST to the applications, and I have not
> seen anything in the definition of UST that would put UST in user
> space.

I don\'t really understand. For a POSIX system, UST is CLOCK_MONOTONIC. Now
I know Linux does not yet support this, but it will eventually. Apparently
adding CLOCK_MONOTONIC to libc will change its ABI.
If CLOCK_MONOTONIC is accurate enough, then it can be used to sync
audio/midi/video by associating the performance time (e.g. with audio as
the master, MSC) with the UST.

So instead of having a MIDI API that lets you schedule MIDI messages on a
dozen different timebases, you can only schedule to UST. The application
will now the relation between the audio time (frames) and UST, and allthough
both will drift this doesn\'t really matter for the short period MIDI messages
are scheduled ahead (i.e. << 1s, probably more like 100ms or less).

Or am I missing something?

--martijn

Powered by ASHosting


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

This archive was generated by hypermail 2b28 : Wed Jul 24 2002 - 01:03:01 EEST