Function

AudioQueueDeviceGetCurrentTime

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

Declaration

OSStatus AudioQueueDeviceGetCurrentTime(AudioQueueRef inAQ, AudioTimeStamp *outTimeStamp);

Parameters

inAQ

The audio queue whose associated audio device is to be queried.

outDeviceTime

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

A result code. See Result Codes.

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

Handling Timing

AudioQueueCreateTimeline

Creates a timeline object for an audio queue.

AudioQueueDisposeTimeline

Disposes of an audio queue’s timeline object.

AudioQueueDeviceGetNearestStartTime

Gets the start time, for an audio hardware device, that is closest to a requested start time.

AudioQueueDeviceTranslateTime

Converts the time for an audio queue’s associated audio hardware device from one time base representation to another.

AudioQueueGetCurrentTime

Gets the current audio queue time.