• 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
Getting playback time from output AudioUnit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting playback time from output AudioUnit


  • Subject: Getting playback time from output AudioUnit
  • From: Zulfiqar Malik <email@hidden>
  • Date: Fri, 20 Aug 2010 15:41:14 +0100

Hi,

I am developing a low latency high performance audio system using CoreAudio that plays in sync with a video playback system. I have got most done, however, I need to know how many samples have been rendered by the output unit at any given instance. I need this for synchronization. Depending on this result I will need to speed up or slow the audio down ever so slightly to get it to play in sync with the video.

However, I am unable to find any such functionality. I am using a HALOutput audio unit. The seconds and milliseconds AudioUnitParameters return a not supported error code. I have tried getting the time from the AudioDevice but that doesn't return me a relative time. I am incredibly frustrated by the lack of useful documentation and flexibility of the AudioUnit API. Using AudioQueues or OpenAL is not an option. All I want to get my synchronization logic working is to get the current number of samples rendered by the output unit.

Any help would be appreciated.

Thank you.

P.S. I am currently making it work by adding up the samples in RenderOutput function but its not accurate and can easily go wrong. Its not something I can depend on. I need more accuracy.

--
Zulfiqar Malik
The Foundry, 1 Wardour Street, London, W1D 6PA, UK
Tel: +44 (0)20 7434 0449 - Fax: +44 (0)20 7434 1550
Web: www.thefoundry.co.uk

The Foundry Visionmongers Ltd. Registered in England and Wales No: 4642027


_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Getting playback time from output AudioUnit
      • From: Patrick Muringer <email@hidden>
  • Prev by Date: AudioFileCreateWithURL returns -50 error on iPhone Simulator
  • Next by Date: Re: AudioFileCreateWithURL returns -50 error on iPhone Simulator
  • Previous by thread: Re: AudioFileCreateWithURL returns -50 error on iPhone Simulator
  • Next by thread: Re: Getting playback time from output AudioUnit
  • Index(es):
    • Date
    • Thread