---
title: SetRange
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudioslidercontrol/setrange
---

# SetRange

Sets the range of possible values for the slider.

## Declaration

```occ
kern_return_t SetRange(IOUserAudioSliderRange in_range);
```

## Parameters

- `in_range`: The range to set.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. For a list of error codes, see Error Codes.

## Discussion

Discussion If successful, changing the range sends a notification to the host to update the object state. This method synchronizes by using the work queue created by the object.

## See Also

### Accessing the Value

- [SetControlValue](audiodriverkit/iouseraudioslidercontrol/setcontrolvalue.md)
- [GetControlValue](audiodriverkit/iouseraudioslidercontrol/getcontrolvalue.md)
- [GetRange](audiodriverkit/iouseraudioslidercontrol/getrange.md)
- [IOUserAudioSliderRange](audiodriverkit/iouseraudiosliderrange.md)
