[gmpi] Re: 3.9 Time wrap up - UST

  • From: Mike Berry <mberry@xxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Wed, 10 Mar 2004 11:46:05 -0700



Tim Hockin wrote:

First attempt at wrapping up UST, which will fold up into the bigger wrap up
attempt #2.


The main point of UST is to relate the audio clock to a neutral clock. This allows GMPI plugs to sync to other clock sources (such as video). For a good read on UST: http://www.lurkertech.com/lg/time/intro.html

Because UST is not defined on some platforms, if we want to use it, GMPI
will need to define the UST source and resolution on every platform GMPI
supports.  This may be best as a separate sub-spec.

It was suggested that plugins which need UST get it themselves.  The problem
here is jitter.  Two plugins will get different UST times for the same audio
frame, with a non-deterministic jitter to the actual UST time for that
frame.  Worse, a plugin which is procesed later than another might get a
later UST time for an earlier sample frame.  If the process buffer size is
small enough, maybe this jitter does not matter?  Can we guarantee that the
process buffer size is small enough?  I think no.

So my position is that we should support UST in the following manner:

1) The host or audio driver snapshots the UST when the buffer becomes available
for a process() run.

2) Plugins are notified of this UST time along with the sample counter when
they are called for process().  This might be an argument to process() or an
event, or a host callback - it doesn't matter for now.

3) There must be some way to calculate the UST for any sample.  Either the
host exposes a UST_per_sample scalar or there is a host callback or
something.  The host is responsible for recalibrating any scalar
sufficiently often as to avoid drift.

4) UST support, as described above, is required of all GMPI hosts.



There is really no way that I can live with #4. We aren't even always putting audio out to an audio card - in many cases we are transmitting the audio out to a camera, with a reasonably unspecified amount of latency. Not to mention all of the trick play modes I talked about earlier. We would only be able to supply UST under very specific circumstances, so specific as to make a plugin that was relying on it very unstable.
This is all assuming that the host is required to return a valid UST value whenever the plugin wants it. If we are allowed to return UST_Unavailable, I can live with that.
And what about offline? It is not mentioned here.



-- Mike Berry Adobe Systems


---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: