ADC Home > Reference Library > Reference > Audio > Core Audio > Core Audio Framework Reference
|
AudioHardwarePlugInInterface |
Superclass: | struct |
Declared In: |
The CFPlugIn interface to a HAL plug-in.
In CFPlugIn terms, AudioHardwarePlugInInterface is a subclass of IUnknown.
AddRef |
The IUnknown method for retaining a reference to a CFPlugIn type.
See Also:
- STDMETHODCALLTYPE *AddRef
ULONG (STDMETHODCALLTYPE *AddRef)( void*inSelf);
inSelf
The resulting reference count after the new reference is added.
DeviceAddIOProc |
Registers the given AudioDeviceIOProc with the AudioDevice.
OSStatus (*DeviceAddIOProc)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, AudioDeviceIOProc inProc, void*inClientData);
inSelf
inDevice
inProc
inClientData
An OSStatus indicating success or failure.
A client may have multiple IOProcs for a given device, but the device is free to only accept as many as it can handle. Note that it is not recommended for clients to have more than a single IOProc registered at a time as this can be wasteful of system resources. Rather, it is recommended that the client do any necessary mixing itself so that only one IOProc is necessary.
DeviceGetCurrentTime |
Retrieves the current time from an AudioDevice. Note that the device has to be running.
OSStatus (*DeviceGetCurrentTime)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, AudioTimeStamp*outTime);
inSelf
inDevice
outTime
An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be returned if the AudioDevice isn't running.
DeviceGetNearestStartTime |
Query an AudioDevice to get a time equal to or later than the given time that is the best time to start IO.
OSStatus (*DeviceGetNearestStartTime)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, AudioTimeStamp*ioRequestedStartTime, UInt32 inFlags);
inSelf
inDevice
ioRequestedStartTime
inFlags
An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be returned if the AudioDevice isn't running. kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does not support starting at a specific time.
The time that is returned is dictated by the constraints of the device and the system. For instance, the driver of a device that provides both audio and video data may only allow start times that coincide with the edge of a video frame. Also, if the device already has one or more active IOProcs, the start time will be shifted to the beginning of the next IO cycle so as not to cause discontinuities in the existing IOProcs. Another reason the start time may shift is to allow for aligning the buffer accesses in an optimal fashion. Note that the device must be running to use this function.
DeviceGetProperty |
Queries an the AudioDevice object to get the data of the given property and places it in the provided buffer.
OSStatus (*DeviceGetProperty)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, UInt32*ioPropertyDataSize, void*outPropertyData);
inSelf
inDevice
inChannel
isInput
inPropertyID
ioPropertyDataSize
outPropertyData
An OSStatus indicating success or failure.
DeviceGetPropertyInfo |
Retrieve information about the given property of an AudioDevice.
OSStatus (*DeviceGetPropertyInfo)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, UInt32*outSize, Boolean*outWritable);
inSelf
inDevice
inChannel
isInput
inPropertyID
outSize
outWritable
An OSStatus indicating success or failure.
DeviceRead |
Read some data from an AudioDevice starting at the given time.
OSStatus (*DeviceRead)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, const AudioTimeStamp*inStartTime, AudioBufferList*outData);
inSelf
inDevice
inStartTime
outData
An OSStatus indicating success or failure. kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does not support direct reading.
DeviceRemoveIOProc |
Unregisters the given AudioDeviceIOProc from the AudioDevice.
OSStatus (*DeviceRemoveIOProc)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, AudioDeviceIOProc inProc);
inSelf
inDevice
inProc
An OSStatus indicating success or failure.
DeviceSetProperty |
Tells the AudioDevice object to change the value of the given property using the provided data.
OSStatus (*DeviceSetProperty)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, const AudioTimeStamp*inWhen, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, UInt32 inPropertyDataSize, const void*inPropertyData);
inSelf
inDevice
inWhen
inChannel
isInput
inPropertyID
inPropertyDataSize
inPropertyData
An OSStatus indicating success or failure.
DeviceStart |
Starts IO for the given AudioDeviceIOProc.
OSStatus (*DeviceStart)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, AudioDeviceIOProc inProc);
inSelf
inDevice
inProc
An OSStatus indicating success or failure.
DeviceStartAtTime |
Starts IO for the given AudioDeviceIOProc and aligns the IO cycle of the AudioDevice with the given time.
OSStatus (*DeviceStartAtTime)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, AudioDeviceIOProc inProc, AudioTimeStamp*ioRequestedStartTime, UInt32 inFlags);
inSelf
inDevice
inProc
ioRequestedStartTime
inFlags
An OSStatus indicating success or failure. kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does not support starting at a specific time and inProc and ioRequestedStartTime are not NULL.
DeviceStop |
Stops IO for the given AudioDeviceIOProc.
OSStatus (*DeviceStop)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, AudioDeviceIOProc inProc);
inSelf
inDevice
inProc
An OSStatus indicating success or failure.
DeviceTranslateTime |
Translates the time in the AudioDevice's time base from one representation to another. Note that the device has to be running
OSStatus (*DeviceTranslateTime)( AudioHardwarePlugInRef inSelf, AudioDeviceID inDevice, const AudioTimeStamp*inTime, AudioTimeStamp*outTime);
inSelf
inDevice
inTime
outTime
An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be returned if the AudioDevice isn't running.
Initialize |
This method is called to initialize the instance of the plug-in.
OSStatus (*Initialize)( AudioHardwarePlugInRef inSelf);
inSelf
An OSStatus indicating success or failure.
As part of initialization, the plug-in should publish all the AudioObjects it knows about at the time.
InitializeWithObjectID |
This method is called to initialize the instance of the plug-in.
OSStatus (*InitializeWithObjectID)( AudioHardwarePlugInRef inSelf, AudioObjectID inObjectID);
inSelf
inObjectID
An OSStatus indicating success or failure.
As part of initialization, the plug-in should publish all the AudioObjects it knows about at the time. This method supersedes the Initialize method for version 3 plug-ins so that an AudioObjectID can be associated with the plug-in right from the start.
ObjectGetPropertyData |
Queries an AudioObject to get the data of the given property and places it in the provided buffer.
OSStatus (*ObjectGetPropertyData)( AudioHardwarePlugInRef inSelf, AudioObjectID inObjectID, const AudioObjectPropertyAddress*inAddress, UInt32 inQualifierDataSize, const void*inQualifierData, UInt32*ioDataSize, void*outData);
inSelf
inObjectID
inAddress
inQualifierDataSize
inQualifierData,
ioDataSize
outData
An OSStatus indicating success or failure.
ObjectGetPropertyDataSize |
Queries an AudioObject to find the size of the data for the given property.
OSStatus (*ObjectGetPropertyDataSize)( AudioHardwarePlugInRef inSelf, AudioObjectID inObjectID, const AudioObjectPropertyAddress*inAddress, UInt32 inQualifierDataSize, const void*inQualifierData, UInt32*outDataSize);
inSelf
inObjectID
inAddress
inQualifierDataSize
inQualifierData,
outDataSize
An OSStatus indicating success or failure.
ObjectHasProperty |
Queries an AudioObject about whether or not it has the given property.
Boolean (*ObjectHasProperty)( AudioHardwarePlugInRef inSelf, AudioObjectID inObjectID, const AudioObjectPropertyAddress*inAddress);
inSelf
inObjectID
inAddress
A Boolean indicating whether or not the AudioObject has the given property.
ObjectIsPropertySettable |
Queries an AudioObject about whether or not the given property can be set using AudioObjectSetPropertyData.
OSStatus (*ObjectIsPropertySettable)( AudioHardwarePlugInRef inSelf, AudioObjectID inObjectID, const AudioObjectPropertyAddress*inAddress, Boolean*outIsSettable);
inSelf
inObjectID
inAddress
outIsSettable
An OSStatus indicating success or failure.
ObjectSetPropertyData |
Tells an AudioObject to change the value of the given property using the provided data.
OSStatus (*ObjectSetPropertyData)( AudioHardwarePlugInRef inSelf, AudioObjectID inObjectID, const AudioObjectPropertyAddress*inAddress, UInt32 inQualifierDataSize, const void*inQualifierData, UInt32 inDataSize, const void*inData);
inSelf
inObjectID
inAddress
inQualifierDataSize
inQualifierData
inDataSize
inData
An OSStatus indicating success or failure.
ObjectShow |
Prints to standard out a textural description of the AudioObject.
void (*ObjectShow)( AudioHardwarePlugInRef inSelf, AudioObjectID inObjectID);
inSelf
inObjectID
QueryInterface |
The IUnknown method for finding an interface on a CFPlugIn type.
See Also:
- STDMETHODCALLTYPE *QueryInterface
HRESULT (STDMETHODCALLTYPE *QueryInterface)( void*inSelf, REFIID inUUID, LPVOID*outInterface);
inSelf
inUUID
outInterface
An error code indicating success of failure.
Release |
The IUnknown method for releasing a reference to a CFPlugIn type.
See Also:
- STDMETHODCALLTYPE *Release
ULONG (STDMETHODCALLTYPE *Release)( void*inSelf);
inSelf
The resulting reference count after the reference has been removed.
STDMETHODCALLTYPE *AddRef |
The IUnknown method for retaining a reference to a CFPlugIn type.
See Also:
- AddRef
ULONG (STDMETHODCALLTYPE *AddRef)( void*inSelf);
inSelf
STDMETHODCALLTYPE *QueryInterface |
The IUnknown method for finding an interface on a CFPlugIn type.
See Also:
- QueryInterface
HRESULT (STDMETHODCALLTYPE *QueryInterface)( void*inSelf, REFIID inUUID, LPVOID*outInterface);
inSelf
inUUID
outInterface
STDMETHODCALLTYPE *Release |
The IUnknown method for releasing a reference to a CFPlugIn type.
See Also:
- Release
ULONG (STDMETHODCALLTYPE *Release)( void*inSelf);
inSelf
StreamGetProperty |
Queries an the AudioStream object to get the data of the given property and places it in the provided buffer.
OSStatus (*StreamGetProperty)( AudioHardwarePlugInRef inSelf, AudioStreamID inStream, UInt32 inChannel, AudioDevicePropertyID inPropertyID, UInt32*ioPropertyDataSize, void*outPropertyData);
inSelf
inStream
inChannel
inPropertyID
ioPropertyDataSize
outPropertyData
An OSStatus indicating success or failure.
StreamGetPropertyInfo |
Retrieve information about the given property of an AudioStream.
OSStatus (*StreamGetPropertyInfo)( AudioHardwarePlugInRef inSelf, AudioStreamID inStream, UInt32 inChannel, AudioDevicePropertyID inPropertyID, UInt32*outSize, Boolean*outWritable);
inSelf
inStream
inChannel
inPropertyID
outSize
outWritable
An OSStatus indicating success or failure.
StreamSetProperty |
Tells the AudioStream object to change the value of the given property using the provided data.
OSStatus (*StreamSetProperty)( AudioHardwarePlugInRef inSelf, AudioStreamID inStream, const AudioTimeStamp*inWhen, UInt32 inChannel, AudioDevicePropertyID inPropertyID, UInt32 inPropertyDataSize, const void*inPropertyData);
inSelf
inStream
inWhen
inChannel
inPropertyID
inPropertyDataSize
inPropertyData
An OSStatus indicating success or failure.
Teardown |
This method is called to tear down the instance of the plug-in.
OSStatus (*Teardown)( AudioHardwarePlugInRef inSelf);
inSelf
An OSStatus indicating success or failure.
_reserved |
A standard part of the IUnknown interface.
void* _reserved;
|