Function

AudioHardwareServiceGetPropertyData

Gets the value for a specified property.

Declaration

OSStatus AudioHardwareServiceGetPropertyData(AudioObjectID inObjectID, const AudioObjectPropertyAddress *inAddress, UInt32 inQualifierDataSize, const void *inQualifierData, UInt32 *ioDataSize, void *outData);

Parameters

inObjectID

The HAL audio object to query.

inAddress

The property whose value you want.

inQualifierDataSize

A UInt32 value indicating the size of the buffer pointed to by the inQualifierData parameter. Not all properties require qualification; in such a case you set this parameter to 0.

inQualifierData

A buffer of data to be used in determining the value of the property being queried. Not all properties require qualification; in such a case you set this parameter to NULL.

ioDataSize

On input, a UInt32 value that indicates the size, in bytes, of the buffer pointed to by the outData parameter. On exit the size of the buffer that was used.

outData

The buffer into which the HAL audio object will put the property value.

Return Value

A result code.

Discussion

Some Core Audio property values are C types and others are Core Foundation objects.

If you call this function to retrieve a value that is a Core Foundation object, then this function—despite the use of “Get” in its name—duplicates the object. You are responsible for releasing the object, as described in The Create Rule in Memory Management Programming Guide for Core Foundation.

See Also