AudioCodecGetProperty(_:_:_:_:)
Retrieves the value of a codec property.
Declaration
func AudioCodecGetProperty(_ inCodec: AudioCodec, _ inPropertyID: AudioCodecPropertyID, _ ioPropertyDataSize: UnsafeMutablePointer<UInt32>, _ outPropertyData: UnsafeMutableRawPointer) -> OSStatusParameters
- inCodec:
An audio codec object. Because an audio codec object is a Component Manger component instance, you can use the Component Manager (for example, the functions 1516552 Findnextcomponent and OpenAComponent) to obtain an audio codec object.
- inPropertyID:
Property ID of the property whose value you want to obtain. Codec property IDs are listed in 1494121 Global Codec Properties and 1494111 Instance Codec Properties.
- ioPropertyDataSize:
On input, the size in bytes of the data buffer pointed to by the
outPropertyDataparameter. On output, the amount of data actually written to the buffer. - outPropertyData:
The property data buffer.
Return Value
Returns NoErr if successful, otherwise, a result code. See Result Codes for a list of possible values.
Discussion
All property values can be read regardless of the state of the codec. However, the values of some properties depend on whether the codec is initialized. Before calling this function, call the AudioCodecGetPropertyInfo(_:_:_:_:) function to determine the size of buffer you need for the property value.