---
title: SetSampleRate
framework: VideoDriverKit
role: symbol
role_heading: Instance Method
platforms: [driverkit 27.0+]
path: videodriverkit/iouservideoclockdevice/setsamplerate
---

# SetSampleRate

Sets the current sample rate for the clock device.

## Declaration

```occ
kern_return_t SetSampleRate(double in_sample_rate);
```

## Parameters

- `in_sample_rate`: The sample rate to set on the clock device..

## Discussion

Discussion Changing the sample rate will send a notification to the host to update the object state if successful. The object’s work queue synchronizes access to the sample rate.

## See Also

### Working with sample rates

- [GetSampleRate](videodriverkit/iouservideoclockdevice/getsamplerate.md)
- [SetAvailableSampleRates](videodriverkit/iouservideoclockdevice/setavailablesamplerates.md)
- [GetAvailableSampleRates](videodriverkit/iouservideoclockdevice/getavailablesamplerates.md)
- [GetNumberAvailableSampleRates](videodriverkit/iouservideoclockdevice/getnumberavailablesamplerates.md)
