pub unsafe extern "C-unwind" fn AudioDeviceGetNearestStartTime(
in_device: AudioObjectID,
io_requested_start_time: NonNull<AudioTimeStamp>,
in_flags: u32,
) -> i32AudioHardware and objc2-core-audio-types only.Expand description
Query an AudioDevice to get a time equal to or later than the given time that is the best time to start IO.
The time that is returned is dictated by the constraints of the device and the system. For instance, the driver of a device that provides both audio and video data may only allow start times that coincide with the edge of a video frame. Also, if the device already has one or more active IOProcs, the start time will be shifted to the beginning of the next IO cycle so as not to cause discontinuities in the existing IOProcs. Another reason the start time may shift is to allow for aligning the buffer accesses in an optimal fashion. Note that the device must be running to use this function.
Parameter inDevice: The AudioDevice to query.
Parameter ioRequestedStartTime: A pointer to an AudioTimeStamp that, on entry, is the requested start time.
On exit, it will have the a time equal to or later than the requested time,
as dictated by the device’s constraints.
Parameter inFlags: A UInt32 containing flags that modify how this function behaves.
Returns: An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be returned if the AudioDevice isn’t running. kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does not support starting at a specific time.
§Safety
io_requested_start_time must be a valid pointer.