<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/AudioFileSetProperty(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@AudioFileSetProperty"
  },
  "title" : "AudioFileSetProperty(_:_:_:_:)"
}
-->

# AudioFileSetProperty(_:_:_:_:)

Sets the value of an audio file property

```
func AudioFileSetProperty(_ inAudioFile: AudioFileID, _ inPropertyID: AudioFilePropertyID, _ inDataSize: UInt32, _ inPropertyData: UnsafeRawPointer) -> OSStatus
```

## Parameters

`inAudioFile`

The audio file that you want to set a property value for.

`inPropertyID`

The property whose value you want to set. See [Audio File Properties](/documentation/AudioToolbox/1576499-audio-file-properties) for possible values. Use the [`AudioFileGetPropertyInfo(_:_:_:_:)`](/documentation/AudioToolbox/AudioFileGetPropertyInfo(_:_:_:_:)) function to determine whether the property value is writable.

`inDataSize`

The size of the value you are passing in the `inPropertyData` parameter.

`inPropertyData`

The new value for the property.

## Return Value

A result code. See Result Codes.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)