• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how soon is now?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >how soon is now? (From: Os <email@hidden>)

  • Prev by Date: tracking CPU per AU in AUGraph
  • Next by Date: Re: how soon is now?
  • Previous by thread: how soon is now?
  • Next by thread: Re: how soon is now?
  • Index(es):
    • Date
    • Thread