setClockDomain usage
setClockDomain usage
- Subject: setClockDomain usage
- From: email@hidden
- Date: Sun, 22 Mar 2009 21:27:55 -0700
Hello,
I'm writing a kext driver for a USB 2.0 audio device, starting with the Apple USB audio reference code from 10.5.6.
The device's output engine is synced to the input engine, and there is not feedback endpoint, so the setClockDomain function seems ideal to use. The alternative is to start up two streams in a single engine, but that requires separating a lot of the vars into input and output sections. Doable, but just a lot of work now, when setClockDomain seems less troublesome.
After digging around, I found kIOAudioEngineClockDomainKey to get the clockDomain for the input engine. The clockDomain turns out to be the address of the ioAudioEngine object. So I call the output engine's setClockDomain with the input clockDomain.
For output only operation, the input engine needs to be running. It appears that the input engine is not automatically started. So I am proposing to start the input engine with performAudioEngineStart at the beginning of the output engine's performAudioEngineStart.
If I call performAudioEngineStart, will this cause a problem with multiple performAudioEngineStarts? Do I need to keep a reference count of starts, and ignore the stops till the count returns to zero?
Do I need to skip all timestamp actions in the output engine, or will the engine ignore them?
Your thoughts on these questions or the overall architecture are much appreciated.
_______________________________________________
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