---
title: SetAvailableSampleRates
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudioclockdevice/setavailablesamplerates
---

# SetAvailableSampleRates

Sets the available sample rates for the clock device.

## Declaration

```occ
kern_return_t SetAvailableSampleRates(const double *in_sample_rates, size_t in_num_rates);
```

## Parameters

- `in_sample_rates`: A pointer to a buffer of double values containing the available sample rates.
- `in_num_rates`: The number of sample rates in in_sample_rates buffer.

## 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 available sample rates 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

### Working with Sample Rates

- [SetSampleRate](audiodriverkit/iouseraudioclockdevice/setsamplerate.md)
- [GetSampleRate](audiodriverkit/iouseraudioclockdevice/getsamplerate.md)
- [GetAvailableSampleRates](audiodriverkit/iouseraudioclockdevice/getavailablesamplerates.md)
- [GetNumberAvailableSampleRates](audiodriverkit/iouseraudioclockdevice/getnumberavailablesamplerates.md)
