Re: Trying to port my app to Core Audio. Audio Sync
Re: Trying to port my app to Core Audio. Audio Sync
- Subject: Re: Trying to port my app to Core Audio. Audio Sync
- From: Ralph Hill <email@hidden>
- Date: Mon, 02 Feb 2004 16:48:04 -0800
Thanks James,
Some more questions.
On Feb 2, 2004, at 3:30 PM, James McCartney wrote:
On Feb 2, 2004, at 1:30 PM, Ralph Hill wrote:
... <snip>...
Some questions/concerns:
1. My application is processor intensive and time critical.
If this is strictly true, then insisting on being out of callback is
not the best approach. CoreAudio goes to a lot of work to provide low
latency and while pushing from outside is possible, it is not the way
to get the lowest latency. I would suggest that you rewrite your
engine to take advantage of what CoreAudio provides.
This is not an option. The program behavior would be extremely
difficult to emulate (possibly impossible) using a pull model for audio
delivery. The time needed for such a rewrite, if it were possible,
would be prohibitive.
...<snip>...
Page 15. " the timestamp of when the first sample frame of the
output data will be consumed by the driver."
Is there any way to estimate the delay through the driver and audio
output hardware? I want to know when the audio hits the output
jacks.
kAudioDevicePropertyLatency = 'ltnc',
// a UInt32 containing the number of frames of latency in the device
// Note that input and output latency may differ. Further, streams
// may have additional latency so they should be queried as well.
// If both the device and the stream say they have latency, then
// the total latency for the stream is the device latency summed with
// the stream latency.
Thank you, I had not noticed this. Perhaps the paragraph on page 15
could mention this property.
This gives me one number, and says that in and out may differ. Given
that this only gives one number, how do I know what the out latency is?
The in? Also, what latency is this. The comment says "latency in the
device", but what two events are we measuring the latency between?
Also, this mentions stream latency, but I can find no property for
getting the stream latency (I read all the stream properties in the .h
and searched for latency in all the core audio .h files). Could you
tell me where I find that information please?
Page 20. "A UInt32 containing the size of the IO buffers in bytes. "
That is the size of each buffer, not the accumulated size of all the
buffers, right?
kAudioDevicePropertyBufferSize = 'bsiz',
// a UInt32 containing the size of the IO buffers in bytes
// This property is deprecated in favor of
kAudioDevicePropertyBufferFrameSize
i.e. don't use this property any more.
Ok. I read up on kAudioDevicePropertyBufferFrameSize. Can I set this
property? The documentation says that apps should listen to it but
makes no mention of the implications of setting it. I have to be able
to set it to a fairly small value (about 10msec) to get my app to work.
Is this allowed?
-
james mccartney
apple coreaudio
ralph hill
Pixar Animation Studios
_______________________________________________
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.