---
title: "AudioQueueGetCurrentTime(_:_:_:_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/audioqueuegetcurrenttime(_:_:_:_:)"
---

# AudioQueueGetCurrentTime(_:_:_:_:)

Gets the current audio queue time.

## Declaration

```swift
func AudioQueueGetCurrentTime(_ inAQ: AudioQueueRef, _ inTimeline: AudioQueueTimelineRef?, _ outTimeStamp: UnsafeMutablePointer<AudioTimeStamp>?, _ outTimelineDiscontinuity: UnsafeMutablePointer<DarwinBoolean>?) -> OSStatus
```

## Parameters

- `inAQ`: The audio queue whose current time you want to get.
- `inTimeline`: The audio queue timeline object to which timeline discontinuities are reported. Use NULL if the audio queue does not have an associated timeline object.
- `outTimeStamp`: On output, the current audio queue time. The mSampleTime field represents audio queue time in terms of the audio queue sample rate, relative to when the queue started or will start.
- `outTimelineDiscontinuity`: On output, true if there has been a timeline discontinuity, or false if there has been no discontinuity. If the audio queue does not have an associated timeline object, this parameter is always NULL. A timeline discontinuity may occur, for example, if the sample rate is changed for the audio hardware device associated with an audio queue.

## Return Value

Return Value A result code. See Result Codes.

## See Also

### Managing the Timeline

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