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

Re: Latency Issue


  • Subject: Re: Latency Issue
  • From: Stefan Werner <email@hidden>
  • Date: Fri, 30 Jan 2004 10:07:38 +0100

Hi,

On Jan 30, 2004, at 7:00 AM, email@hidden wrote:

For the software playthrough testing i have done. I used my audio driver as input device and the build-in audio driver (system speaker) as an output device. I have found that the audio come out from the system speaker was around 300 msec behind the audio comes from the hardware playthrough.

In that case, you also have to consider that the default output adds latency too. What program did you use to test the latency? Usually, there's an additional buffer between your application and the HAL, and I think the default for most built-in sound hardware is 512 frames.

From what i understand, that 300 msec delay would comes from :

Input Latency + Input Safety Offset + (2* IO buffer Size) + Output Safety Offset + Output Latency

You have to add the applications themselves to that equation. It's the best to use a test application that lets you adjust the buffer size or to write your own throughput application.

therefore, most of the delay comes from the IObuffer size then? and the way to minimize the latency is the adjust IObuffer size only?

That and the safety offset. If you do the math, 2*4096 samples at 48kHz are about 170ms, so this seems to be where most of your ~300ms come from.

Also for the input latency parameters specified in the setInputSampleLatency(), does it means the hardware latency for passing through the converter and before DMA process?

Yes, with setInputLatency() you tell the HAL what latency your hardware itself has. Applications can use that to compensate latency, e.g. for synching audio with video.

hope this helps,
Stefan
_______________________________________________
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.

  • Prev by Date: Re: Latency Issue
  • Next by Date: Re: PostConstructor vs Initialize (AU's built-in Parameter Implementation)
  • Previous by thread: Re: Latency Issue
  • Next by thread: Exporting at MPEG4 error
  • Index(es):
    • Date
    • Thread