• 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: Stream/Device Latency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stream/Device Latency


  • Subject: Re: Stream/Device Latency
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 30 May 2002 11:43:31 -0700

On Thursday, May 30, 2002, at 09:07 AM, Andrew Kimpton wrote:

I'm attempting to use kAudioDevicePropertyLatency ('ltnc') to establish the latencies in my input and output streams. Running with a TiBook (667), Mac OS X 10.1.4 and using the built in audio hardware getting the value of this property always seems to return 0 (and no errors). I notice in TN 2029 mention of a kAudioDevicePropertyStreamLatency but this doesn't seem to be in the Framework headers I have installed (I have the latest dev tools) should I actually be getting the Stream Latency property (if so what's the 'selector' code) or are they the same thing but the built-in hardware driver for the TiBook just returns zero for the latency ?

The drivers for the built-in don't currently report the correct values for the latency property.

One thing about calculating the latency of things you should remember is that the driver's safety offset affects the latency as well. This is the number of frames the HAL must leave in front of the engine's output head to assure things get transferred correctly. If you were trying to calculate the earliest a frame of audio will hit the wire, you would sum the start time with the safety offset and the latency.

The HAL doesn't really give you a whole lot of guarantees about what the first output time stamp will be, so you don't want to rely on the start up latency of AudioDeviceStart() by starting the IOProc before you want to start outputting data. In that case the output time stamp will already reflect the safety offset but not the latency.

--

Jeff Moore
Core Audio
Apple
_______________________________________________
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: 
 >Stream/Device Latency (From: Andrew Kimpton <email@hidden>)

  • Prev by Date: Stream/Device Latency
  • Next by Date: musictrack to aunode
  • Previous by thread: Stream/Device Latency
  • Next by thread: musictrack to aunode
  • Index(es):
    • Date
    • Thread