<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudio",
  "identifier" : "/documentation/CoreAudio/AudioDeviceTranslateTime(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Audio"
    ],
    "preciseIdentifier" : "c:@F@AudioDeviceTranslateTime"
  },
  "title" : "AudioDeviceTranslateTime(_:_:_:)"
}
-->

# AudioDeviceTranslateTime(_:_:_:)

```
func AudioDeviceTranslateTime(_ inDevice: AudioObjectID, _ inTime: UnsafePointer<AudioTimeStamp>, _ outTime: UnsafeMutablePointer<AudioTimeStamp>) -> OSStatus
```

## Parameters

`inDevice`

The AudioDevice whose time base governs the translation.

`inTime`

An AudioTimeStamp containing the time to be translated.

`outTime`

An AudioTimeStamp into which the translated time is put. On entry, the
mFlags field specifies which representations to translate the input time
into. Because not every device supports all time representations, on exit,
the mFlags field will indicate which translations were actually done.

## Return Value

An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
returned if the AudioDevice isn’t running.

## Discussion

\abstract Translates the time in the AudioDevice’s time base from one representation to
another. Note that the device has to be running

---

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)