---
title: "AudioQueueDeviceGetCurrentTime(_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audioqueuedevicegetcurrenttime(_:_:)"
---

# AudioQueueDeviceGetCurrentTime(_:_:)

Gets the current time of the audio hardware device associated with an audio queue.

## Declaration

```swift
func AudioQueueDeviceGetCurrentTime(_ inAQ: AudioQueueRef, _ outTimeStamp: UnsafeMutablePointer<AudioTimeStamp>) -> OSStatus
```

## Parameters

- `inAQ`: The audio queue whose associated audio device is to be queried.
- `outTimeStamp`: On output, the current time of the audio hardware device associated with the audio queue. If the device is not running, the only valid field in the audio timestamp structure is mHostTime.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion This function returns a value whether or not the audio hardware device associated with the audio queue is running. The similar AudioDeviceGetCurrentTime function, declared in the AudioHardware.h header file, returns an error in this case.

## See Also

### Related Documentation

- [AudioDeviceGetCurrentTime(_:_:)](coreaudio/audiodevicegetcurrenttime(_:_:).md)

### Managing the Timeline

- [AudioQueueCreateTimeline(_:_:)](audiotoolbox/audioqueuecreatetimeline(_:_:).md)
- [AudioQueueDisposeTimeline(_:_:)](audiotoolbox/audioqueuedisposetimeline(_:_:).md)
- [AudioQueueDeviceGetNearestStartTime(_:_:_:)](audiotoolbox/audioqueuedevicegetneareststarttime(_:_:_:).md)
- [AudioQueueDeviceTranslateTime(_:_:_:)](audiotoolbox/audioqueuedevicetranslatetime(_:_:_:).md)
- [AudioQueueGetCurrentTime(_:_:_:_:)](audiotoolbox/audioqueuegetcurrenttime(_:_:_:_:).md)
- [AudioQueueTimelineRef](audiotoolbox/audioqueuetimelineref.md)
