Re: Sample accurate sync of simultaneous live input and output
Re: Sample accurate sync of simultaneous live input and output
- Subject: Re: Sample accurate sync of simultaneous live input and output
- From: Jeff Moore <email@hidden>
- Date: Fri, 19 Oct 2007 11:57:03 -0700
Thanks for the advice on my previous post Jeff, this is just what I need to know. I am now following the Aggregate device option. Now as one question often leads to another I would like to be sure I understand the parameters I need to set to build the aggregate device programmatically.....
I've created a device using the Audio MIDI setup utility and created test code to view the CFDictionary from kAudioAggregateDevicePropertyComposition. From this I've got a fairly good idea what needs to go where but a few things are not totally clear to me.
1. The reported subdevices all have latencies set to zero within the CFDictionary from kAudioAggregateDevicePropertyComposition. Does this mean the underlying hardwaredevices in the aggregate device should still be used to obtain the latency 'to/from the wire'?
That is the slop latency that is added to the device's latency, aka kAudioSubDevicePropertyExtraLatency.
2. If the 'drift' key is set to a kAudioSubDeviceDriftCompensation above MinQuality does this mean the aggregate device will compensate for any drift between the sample clocks of different devices (I'll only be using 2 - one input, one output) for me? I won't have to worry if the app runs audio for hours, the output to input sample latency will stay consistent? I'm hoping yes...
There are two keys, kAudioSubDeviceDriftCompensationKey and kAudioSubDeviceDriftCompensationQualityKey. The former turns drift compensation on and off while the latter controls the quality of the rate converter. Currently, the quality setting doesn't do anything and the HAL always uses a simple sample doubling/dropping algorithm.
3. Is there a convention for creating a new unique uid for kAudioAggregateDeviceUIDKey or can it be any sensible unique string?
There aren't any conventions, but the reverse-dns style used everywhere wouldn't be a bad idea to use.
--
Jeff Moore Core Audio Apple
|
_______________________________________________
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