---
title: "setVolumeRamp(fromStartVolume:toEndVolume:timeRange:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmutableaudiomixinputparameters/setvolumeramp(fromstartvolume:toendvolume:timerange:)"
---

# setVolumeRamp(fromStartVolume:toEndVolume:timeRange:)

Sets a volume ramp to apply during a specified time range.

## Declaration

```swift
func setVolumeRamp(fromStartVolume startVolume: Float, toEndVolume endVolume: Float, timeRange: CMTimeRange)
```

## Parameters

- `startVolume`: The starting volume. The value must be between 0.0 and 1.0.
- `endVolume`: The end volume. The value must be between 0.0 and 1.0.
- `timeRange`: The time range over which to apply the ramp.

## See Also

### Setting the volume

- [setVolume(_:at:)](avfoundation/avmutableaudiomixinputparameters/setvolume(_:at:).md)
