---
title: "AudioUnitSetParameter(_:_:_:_:_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audiounitsetparameter(_:_:_:_:_:_:)"
---

# AudioUnitSetParameter(_:_:_:_:_:_:)

Sets the value of an audio unit parameter.

## Declaration

```swift
func AudioUnitSetParameter(_ inUnit: AudioUnit, _ inID: AudioUnitParameterID, _ inScope: AudioUnitScope, _ inElement: AudioUnitElement, _ inValue: AudioUnitParameterValue, _ inBufferOffsetInFrames: UInt32) -> OSStatus
```

## Parameters

- `inUnit`: The audio unit that you want to set a parameter value for.
- `inID`: The audio unit parameter identifier.
- `inScope`: The audio unit scope for the parameter.
- `inElement`: The audio unit element for the parameter.
- `inValue`: The value that you want to apply to the parameter.
- `inBufferOffsetInFrames`: Set this to 0. To schedule the setting of a parameter value, use the doc://com.apple.audiotoolbox/documentation/AudioToolbox/AudioUnitScheduleParameters(_:_:_:) function.

## Mentioned in

Migrating Your Audio Unit Host to the AUv3 API

## Return Value

Return Value A result code.

## See Also

### Getting and Setting Parameters

- [AudioUnitGetParameter(_:_:_:_:_:)](audiotoolbox/audiounitgetparameter(_:_:_:_:_:).md)
- [AudioUnitScheduleParameters(_:_:_:)](audiotoolbox/audiounitscheduleparameters(_:_:_:).md)
