Function AudioQueueGetCurrentTime

Source
pub unsafe extern "C-unwind" fn AudioQueueGetCurrentTime(
    in_aq: AudioQueueRef,
    in_timeline: AudioQueueTimelineRef,
    out_time_stamp: *mut AudioTimeStamp,
    out_timeline_discontinuity: *mut u8,
) -> i32
Available on crate features AudioQueue and objc2-core-audio-types only.
Expand description

Obtains the current audio queue time.

You must specify a timeline object if you want to be notified about any timeline discontinuities in the outTimelineDiscontinuity parameter. If you don’t care about discontinuities, pass NULL in the inTimeLine and outTimelineDiscontinuity parameters.

Parameter inAQ: The audio queue whose current time you want to obtain.

Parameter inTimeline: The audio queue timeline object to which any timeline discontinuities are reported. May be NULL.

Parameter outTimeStamp: On return, points to an audio timestamp structure containing the current audio queue time. The mSampleTime field is in terms of the audio queue’s sample rate, and relative to the time at which the queue has started or will start.

Parameter outTimelineDiscontinuity: Can be NULL. On return, only set to true or false if the inTimeLine parameter is not NULL. Set to true if a discontinuity has occurred in the sample timeline of the audio queue. For instance, the device’s sample rate changed and a gap occurred in playback or recording, or the audio queue was unable to prepare and playback in time because it was late.

Returns: An OSStatus result code.