---
title: "AudioDeviceTranslateTime(_:_:_:)"
framework: coreaudio
role: symbol
role_heading: Function
path: "coreaudio/audiodevicetranslatetime(_:_:_:)"
---

# AudioDeviceTranslateTime(_:_:_:)

## Declaration

```swift
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

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

## Discussion

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

## See Also

### Functions

- [AudioConvertHostTimeToNanos(_:)](coreaudio/audioconverthosttimetonanos(_:).md)
- [AudioConvertNanosToHostTime(_:)](coreaudio/audioconvertnanostohosttime(_:).md)
- [AudioDeviceCreateIOProcID(_:_:_:_:)](coreaudio/audiodevicecreateioprocid(_:_:_:_:).md)
- [AudioDeviceCreateIOProcIDWithBlock(_:_:_:_:)](coreaudio/audiodevicecreateioprocidwithblock(_:_:_:_:).md)
- [AudioDeviceDestroyIOProcID(_:_:)](coreaudio/audiodevicedestroyioprocid(_:_:).md)
- [AudioDeviceGetCurrentTime(_:_:)](coreaudio/audiodevicegetcurrenttime(_:_:).md)
- [AudioDeviceGetNearestStartTime(_:_:_:)](coreaudio/audiodevicegetneareststarttime(_:_:_:).md)
- [AudioDeviceStart(_:_:)](coreaudio/audiodevicestart(_:_:).md)
- [AudioDeviceStartAtTime(_:_:_:_:)](coreaudio/audiodevicestartattime(_:_:_:_:).md)
- [AudioDeviceStop(_:_:)](coreaudio/audiodevicestop(_:_:).md)
- [AudioGetCurrentHostTime()](coreaudio/audiogetcurrenthosttime().md)
- [AudioGetHostClockFrequency()](coreaudio/audiogethostclockfrequency().md)
- [AudioGetHostClockMinimumTimeDelta()](coreaudio/audiogethostclockminimumtimedelta().md)
- [AudioHardwareCreateAggregateDevice(_:_:)](coreaudio/audiohardwarecreateaggregatedevice(_:_:).md)
- [AudioHardwareDestroyAggregateDevice(_:)](coreaudio/audiohardwaredestroyaggregatedevice(_:).md)
