pub unsafe extern "C-unwind" fn AudioQueueDeviceTranslateTime(
in_aq: AudioQueueRef,
in_time: NonNull<AudioTimeStamp>,
out_time: NonNull<AudioTimeStamp>,
) -> i32AudioQueue and objc2-core-audio-types only.Expand description
Converts the time in the time base of the associated audio device from one representation to another.
This function converts from one time representation to another (for example, from sample time to host time or vice versa):
- Sample time is the absolute sample frame time. Sample numbers are the count of the samples on the audio device.
- Host time is the time base of the host machine such as the time of the bus clock on the CPU.
The mSampleTime field in the AudioTimestamp structure (described in Core Audio Data Types Reference) is always in device time, not in audio queue time. Audio queue time is relative to the audio queue’s start time. The associated audio device has to be running for the AudioQueueDeviceTranslateTime function to provide a result.
Parameter inAQ: The queue whose audio device is to perform the requested time translation.
Parameter inTime: A pointer to a structure containing the time to be translated.
Parameter outTime: On entry, mFlags indicate the desired translations. On exit, mFlags indicates which
of the requested translated fields were successfully populated.
Returns: An OSStatus result code.
§Safety
in_aqmust be a valid pointer.in_timemust be a valid pointer.out_timemust be a valid pointer.