Contents

AudioCodecSetProperty(_:_:_:_:)

Sets the value of a codec property.

Declaration

func AudioCodecSetProperty(_ inCodec: AudioCodec, _ inPropertyID: AudioCodecPropertyID, _ inPropertyDataSize: UInt32, _ inPropertyData: UnsafeRawPointer) -> OSStatus

Parameters

  • 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 set. Settable codec property IDs are listed in 1494111 Instance Codec Properties.

  • inPropertyDataSize:

    Size in bytes of the property value data.

  • inPropertyData:

    Pointer to the data buffer containing the property value.

Return Value

Returns NoErr if successful, otherwise, a result code. See Result Codes for a list of possible values.

Discussion

Codec properties are classified as either global properties, which remain the same for all instances of a codec, or instance properties, which may vary from instance to instance. However, not all instance property values can be modified. See Instance Codec Properties for details. No property values can be modified when the codec is in the initialized state. You must call this function before you call the AudioCodecInitialize(_:_:_:_:_:) function, or after you call the AudioCodecUninitialize(_:) function. Call the AudioCodecGetProperty(_:_:_:_:) function to retrieve the current value of a property.

See Also

Related Documentation

Accessing Codec Properties