Re: how soon is now?
Re: how soon is now?
- Subject: Re: how soon is now?
- From: Doug Wyatt <email@hidden>
- Date: Sat, 19 Jun 2004 17:05:56 -0700
On Jun 19, 2004, at 11:02, Os wrote:
Apologies if this is RTFM, but I was wondering about what the best
practice is when relating
- the time stamps of MIDI events, and
- the time returned by AudioGetCurrentHostTime() when called in a
Audio Unit's render method.
E.g. if my plug-in is generating MIDI events to correspond to audio
signals that it is processing.
Any wisdom gratefully received.
At the AudioDevice (HAL) level, there are three relevant times:
- the input timestamp, which will be approximately 1 buffer + the
device's safety offset in the past
- the output timestamp, which will be approximately 1 buffer + safety
offset in the future
- the current time, which is now!
In the AudioUnit world, the timestamps you'll see will depend on the
host -- but if you're connected to an output unit, you'll be receiving
the output timestamps.
AudioGetCurrentHostTime() is just a wrapper for mach_absolute_time()
(also used by UpTime()), and is in the same units as CoreMIDI
timestamps.
Doug
_______________________________________________
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.