---
title: SetLatency
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudiostream/setlatency
---

# SetLatency

## Declaration

```occ
kern_return_t SetLatency(uint32_t in_latency);
```

## Parameters

- `in_latency`: uint32_t latency value to set. Value is in sample frames.

## Return Value

Return Value Returns kern_return_t.

## Discussion

Discussion Set the latency of the stream in sample frames. Drivers can change the latency of the stream dynamically.  A notification will be sent to the host to update the object state if successful. Setting the value will be synchronized using the work queue created by the object.
