---
title: "setVolume(_:at:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutableaudiomixinputparameters/setvolume(_:at:)"
---

# setVolume(_:at:)

Sets the value of the audio volume starting at the specified time.

## Declaration

```swift
func setVolume(_ volume: Float, at time: CMTime)
```

## Parameters

- `volume`: The volume. The value must be between 0.0 and 1.0.
- `time`: The start time at which to set the volume.

## Discussion

Discussion This method adds a volume ramp starting at time. This volume setting remains in effect until the end of the track unless you set a different volume level to start at a later time.

## See Also

### Setting the volume

- [setVolumeRamp(fromStartVolume:toEndVolume:timeRange:)](avfoundation/avmutableaudiomixinputparameters/setvolumeramp(fromstartvolume:toendvolume:timerange:).md)
