Re: core midi time stamping
Re: core midi time stamping
- Subject: Re: core midi time stamping
- From: Doug Wyatt <email@hidden>
- Date: Thu, 14 Jul 2005 09:33:35 -0700
On Jul 13, 2005, at 21:46, david tay wrote:
How is core midi time stamping done? Product marketing thinks that
some special code is required.
Would special drivers for MIDI interfaces be required to for midi
time stamping to work?
On input, drivers timestamp the incoming data. If the MIDI interface
supports timestamping (this is not part of any standard, but there
are some interfaces that support timestamping using proprietary
protocols), then the driver uses the timestamp from the interface.
On output, if the driver is connected to hardware that supports
schedule-ahead, it can transmit timestamped packets to the hardware
ahead of time. Otherwise, MIDIServer schedules the packets itself,
and delivers the packets to the driver at the correct times.
On input, your app should respect the timestamps in the incoming
packets, rather than using time-of-arrival.
On output, when possible, your app should schedule outgoing packets
in advance. As little as 5 ms in advance may make a noticeable
improvement. Scheduling more than 100 ms in advance is probably not a
good idea, unless you make further calls to flush previously-
scheduled events when you stop etc.
In the presence of drivers that support timestamping, your app
doesn't *have* to do anything special, but you may find it useful to
find out how far in advance output can be scheduled -- that's a
property on the device, inherited by the entity and endpoint.
Doug
--
Doug Wyatt
Core Audio, Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden