Re: MIDITimeStamp
Re: MIDITimeStamp
- Subject: Re: MIDITimeStamp
- From: Kurt Revis <email@hidden>
- Date: Wed, 1 Oct 2003 10:52:09 -0700
On Wednesday, October 1, 2003, at 01:27 AM, Mark Woollard wrote:
Could someone elaborate on the details of the MIDITimeStamp? What
units are used?
First of all, the MIDITimeStamp units are exactly the same as the
HostTime that CoreAudio uses. See this file:
/System/Library/Frameworks/CoreAudio.framework/Headers/HostTime.h
These timestamps come from the processor's timebase register, which is
the highest-resolution clock on the system. Most (if not all) of the OS
depends on this clock for timing
The exact units depend on what machine you're running on. On machines
before the G5, the HostTime updates at 1/4 the processor bus frequency.
I don't know about the G5.
Of course, you shouldn't need to know any of that. To convert to or
from seconds, just use the functions in HostTime.h.
Am I correct that its based on the time the system has been up rather
than how long the app has had an input port open?
I would expect that the clock is zeroed when the machine boots, but I'm
not absolutely sure. In practice it doesn't matter. You never care
about the absolute value of the clock, just differences between
different timestamps.
--
Kurt Revis
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.