ADC Home > Reference Library > Reference > Audio > Core Audio > Core Audio Framework Reference
|
AudioHardwarePlugIn |
Includes: |
This is the CFPlugIn interface presented by a HAL plug-in. The HAL will create only one instance
of each interface. This instance is responsible for providing all required services on behalf of
as many devices of the kind it implements.
The Initialize method is called to allow the plug-in to set itself up. At this time any devices
of it's kind and their streams can be presented to the system using
AudioHardwareDevicesCreated() and AudioHardwareStreamsCreated(). The plug-in is also responsible
for managing it's own notifications, and may install any CFRunLoopSources it needs using
AudioHardwareAddRunLoopSource() at this time as well.
Teardown() is called when the HAL is unloading itself and the plug-in should dispose of any
devices and streams it has created using AudioHardwareDevicesDied() and
AudioHardareStreamsDied().
The rest of the methods in this interface correspond to the semantics of their similarly named
counterparts in
Plug-ins do not have to manage device or stream property listener procs. Instead, a plug-in can
call AudioHardwareDevicePropertyChanged() or AudioHardwareStreamPropertyChanged() and the HAL
will take care of calling all the appropriate listeners.
AudioHardwareClaimAudioDeviceID |
Reserve a new AudioDeviceID.
extern OSStatus AudioHardwareClaimAudioDeviceID( AudioHardwarePlugInRef inOwner, AudioDeviceID*outAudioDeviceID);
inOwner
outAudioDeviceID
An OSStatus indicating success or failure.
AudioHardwareClaimAudioStreamID |
Reserve a new AudioStreamID.
extern OSStatus AudioHardwareClaimAudioStreamID( AudioHardwarePlugInRef inOwner, AudioDeviceID inOwningDeviceID, AudioStreamID*outAudioStreamID);
inOwner
inOwningDeviceID
outAudioStreamID
An OSStatus indicating success or failure.
AudioHardwareDevicePropertyChanged |
Tell the HAL that the property of an AudioDevice owned by the plug-in has changed.
extern OSStatus AudioHardwareDevicePropertyChanged( AudioHardwarePlugInRef inOwner, AudioDeviceID inDeviceID, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID);
inOwner
inDeviceID
inChannel
isInput
inPropertyID
An OSStatus indicating success or failure.
The HAL will take care of calling any registered listeners.
AudioHardwareDevicesCreated |
Tell the HAL that new AudioDevices have come into being.
extern OSStatus AudioHardwareDevicesCreated( AudioHardwarePlugInRef inOwner, UInt32 inNumberDevices, const AudioDeviceID*inAudioDeviceIDs);
inOwner
inNumberDevices
inAudioDeviceIDs
An OSStatus indicating success or failure.
The plug-in must have previously reserved the AudioDeviceIDs using AudioHardwareClaimAudioDeviceID().
AudioHardwareDevicesDied |
Tell the HAL that some AudioDevices have gone away.
extern OSStatus AudioHardwareDevicesDied( AudioHardwarePlugInRef inOwner, UInt32 inNumberDevices, const AudioDeviceID*inAudioDeviceIDs);
inOwner
inNumberDevices
inAudioDeviceIDs
An OSStatus indicating success or failure.
AudioHardwareStreamPropertyChanged |
Tell the HAL that the property of an AudioStream owned by the plug-in has changed.
extern OSStatus AudioHardwareStreamPropertyChanged( AudioHardwarePlugInRef inOwner, AudioDeviceID inOwningDeviceID, AudioStreamID inStreamID, UInt32 inChannel, AudioDevicePropertyID inPropertyID);
inOwner
inOwningDeviceID
inStreamID
inChannel
inPropertyID
An OSStatus indicating success or failure.
The HAL will take care of calling any registered listeners.
AudioHardwareStreamsCreated |
Tell the HAL that new AudioStreams have come into being.
extern OSStatus AudioHardwareStreamsCreated( AudioHardwarePlugInRef inOwner, AudioDeviceID inOwningDeviceID, UInt32 inNumberStreams, const AudioStreamID*inAudioStreamIDs);
inOwner
inOwningDeviceID
inNumberStreams
inAudioStreamIDs
An OSStatus indicating success or failure.
The plug-in must have previously reserved the AudioStreamIDs using AudioHardwareClaimAudioStreamID().
AudioHardwareStreamsDied |
Tell the HAL that some AudioStreams have gone away.
extern OSStatus AudioHardwareStreamsDied( AudioHardwarePlugInRef inOwner, AudioDeviceID inOwningDeviceID, UInt32 inNumberStreams, const AudioStreamID*inAudioStreamIDs);
inOwner
inOwningDeviceID
inNumberDevices
inAudioStreamIDs
An OSStatus indicating success or failure.
AudioObjectCreate |
Instantiates a new AudioObject.
extern OSStatus AudioObjectCreate( AudioHardwarePlugInRef inOwningPlugIn, AudioObjectID inOwningObjectID, AudioClassID inClassID, AudioObjectID*outAudioObjectID);
inOwningPlugIn
inOwningObjectID
inClassID
outAudioObjectID
An OSStatus indicating success or failure.
Newly instantiated AudioObjects are not made available to the HAL's clients until the object is published using AudioObjectsPublishedAndDied().
AudioObjectPropertiesChanged |
Tell the HAL that properties have changed on the given AudioObject.
extern OSStatus AudioObjectPropertiesChanged( AudioHardwarePlugInRef inOwningPlugIn, AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress inAddresses[]);
inOwningPlugIn
inObjectID
inNumberAddresses
inAddresses
An OSStatus indicating success or failure.
The HAL will take care of calling any registered listeners.
AudioObjectsPublishedAndDied |
Tell the HAL to publish some AudioObjects and tear down others.
extern OSStatus AudioObjectsPublishedAndDied( AudioHardwarePlugInRef inOwningPlugIn, AudioObjectID inOwningObjectID, UInt32 inNumberPublishedAudioObjects, const AudioObjectID inPublishedAudioObjects[], UInt32 inNumberDeadAudioObjects, const AudioObjectID inDeadAudioObjects[]);
inOwningPlugIn
inOwningObjectID
inNumberPublishedAudioObjects
inPublishedAudioObjects
inNumberDeadAudioObjects
inDeadAudioObjects
An OSStatus indicating success or failure.
Note that all the objects must be owned by inOwningObjectID.
AudioHardwarePlugInInterface |
Forward declaration of AudioHardwarePlugInInterface.
typedef struct AudioHardwarePlugInInterface AudioHardwarePlugInInterface;
AudioHardwarePlugInRef |
A reference to an AudioHardwarePlugInInterface.
typedef AudioHardwarePlugInInterface** AudioHardwarePlugInRef;
kAudioHardwarePlugInInterface2ID |
#define kAudioHardwarePlugInInterface2ID \ CFUUIDGetConstantUUIDWithBytes( NULL, 0x5D, 0x80, 0xCB, 0x6C, 0x48, 0x4F, 0x11, 0xD7, \ 0x85, 0x71, 0x00, 0x0A, 0x95, 0x77, 0x12, 0x82)
This is the UUID of version 2 of the plug-in interface (5D80CB6C-484F-11D7-8571-000A95771282).
kAudioHardwarePlugInInterface3ID |
#define kAudioHardwarePlugInInterface3ID \ CFUUIDGetConstantUUIDWithBytes( NULL, 0x38, 0xD7, 0x8A, 0x18, 0x77, 0xA5, 0x11, 0xD8, \ 0xB8, 0xB8, 0x00, 0x0A, 0x95, 0x88, 0x78, 0x7E)
This is the UUID of version 3 of the plug-in interface (38D78A18-77A5-11D8-B8B8-000A9588787E).
kAudioHardwarePlugInInterfaceID |
#define kAudioHardwarePlugInInterfaceID \ CFUUIDGetConstantUUIDWithBytes( NULL, 0xFA, 0xFC, 0xAF, 0xC3, 0xBA, 0xE8, 0x11, 0xD6, \ 0xB4, 0xA8, 0x00, 0x03, 0x93, 0x15, 0xCD, 0x46)
This is the UUID of version 1 of the plug-in interface (FAFCAFC3-BAE8-11D6-B4A8-00039315CD46).
kAudioHardwarePlugInTypeID |
#define kAudioHardwarePlugInTypeID \ CFUUIDGetConstantUUIDWithBytes( NULL, 0xF8, 0xBB, 0x1C, 0x28, 0xBA, 0xE8, 0x11, 0xD6, \ 0x9C, 0x31, 0x00, 0x03, 0x93, 0x15, 0xCD, 0x46)
This is the UUID of the plug-in type (F8BB1C28-BAE8-11D6-9C31-00039315CD46).
|