<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioDriverKit",
  "identifier" : "/documentation/AudioDriverKit/IOUserAudioStream/SetLatency",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AudioDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserAudioStream@F@SetLatency#i#"
  },
  "title" : "SetLatency"
}
-->

# SetLatency

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

## Parameters

`in_latency`

uint32_t latency value to set. Value is in sample frames.

## Return Value

Returns kern_return_t.

## Discussion

\abstract Set the latency of the stream in sample frames.
\discussion 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)