Getting playback time from output AudioUnit
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