<!--
{
  "availability" : [
    "iOS: 14.5.0 -",
    "iPadOS: 14.5.0 -",
    "macCatalyst: 14.5.0 -",
    "macOS: 11.3.0 -",
    "tvOS: 14.5.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSampleBufferRenderSynchronizer/setRate(_:time:atHostTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSampleBufferRenderSynchronizer(im)setRate:time:atHostTime:"
  },
  "title" : "setRate(_:time:atHostTime:)"
}
-->

# setRate(_:time:atHostTime:)

Sets the playback rate and the relationship between the current time and host time.

```
func setRate(_ rate: Float, time: CMTime, atHostTime hostTime: CMTime)
```

## Parameters

`rate`

A new timebase rate. This value must be greater than or equal to `0.0`.

`time`

A new timebase time. This value must be greater than or equal to <doc://com.apple.documentation/documentation/CoreMedia/CMTime/zero>, or <doc://com.apple.documentation/documentation/CoreMedia/CMTime/invalid>.

`hostTime`

A new host time. This value must be greater than or equal to <doc://com.apple.documentation/documentation/CoreMedia/CMTime/zero>, or <doc://com.apple.documentation/documentation/CoreMedia/CMTime/invalid>.

## Discussion

---

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)