Property plugins
Property plugins
- Subject: Property plugins
- From: Emmett James <email@hidden>
- Date: Thu, 5 Dec 2002 07:11:29 -0600
Jeff Moore wrote:
>
A few fun facts about the plug-ins defined in
>
<CoreAudio/AudioDriverPlugIn.h>:
>
>
- There is no documentation save what is in the header and the brief
>
mention in the "Writing Audio Drivers" pdf.
>
- There is no sample code.
>
- I'm happy to answer questions.
-----------------
I'm trying to write a custom plugin to control some properties of my PCI
audio card driver.
Here is what I have discerned so far about how it works:
The app calls
AudioDeviceSetProperty(AudioDeviceID inDevice,
const AudioTimeStamp* inWhen,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData);
This ends up in my plugin's
AudioDriverPlugInDeviceSetProperty(
AudioDeviceID inDevice,
const AudioTimeStamp* inWhen,
UInt32 inChannel,
Boolean isInput,
AudioDevicePropertyID inPropertyID,
UInt32 inPropertyDataSize,
const void* inPropertyData);
which then uses the AudioDevicePropertyID argument to look up the
registry key name for the property, and uses the AudioDeviceID to look
up the IOAudioDevice (from the saved AudioDriverPlugInHostInfo) then
calls
IORegistryEntrySetCFProperty(ioAudioDeviceObject, // io_registry_entry_t
registryKey, // CFStringRef propertyName
registryData); // CFTypeRef property
Now my question is, where does this call to IORegistryEntrySetCFProperty()
end up in the KEXT? In MyAudioDevice:setProperties(OSObject * properties)?
If so, what is the nature of the OSbject * properties argument?
In IOAudioControl, I see that this is in fact an OSDictionary.
I have 20 different custom properties. Does this mean my setProperties()
implementation must look through this dictionary for each of my properties'
key names to see which one is getting set in this particular call?
What I would have expected, is that the IORegistryEntrySetCFProperty()
call would have a more direct analog in the KEXT, e.g. some function
whose arguments were a registry key and a property value.
-- Emmett
_______________________________________________
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.