---
title: "AudioFileSetProperty(_:_:_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audiofilesetproperty(_:_:_:_:)"
---

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

Sets the value of an audio file property

## Declaration

```swift
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 doc://com.apple.audiotoolbox/documentation/AudioToolbox/1576499-audio-file-properties for possible values. Use the doc://com.apple.audiotoolbox/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

Return Value A result code. See Result Codes.

## See Also

### Getting and Setting Audio File Properties

- [AudioFileGetProperty(_:_:_:_:)](audiotoolbox/audiofilegetproperty(_:_:_:_:).md)
- [AudioFileGetPropertyInfo(_:_:_:_:)](audiotoolbox/audiofilegetpropertyinfo(_:_:_:_:).md)
