AudioDeviceGetCurrentTime

Function AudioDeviceGetCurrentTime 

Source
pub unsafe extern "C-unwind" fn AudioDeviceGetCurrentTime(
    in_device: AudioObjectID,
    out_time: NonNull<AudioTimeStamp>,
) -> i32
Available on crate features AudioHardware and objc2-core-audio-types only.
Expand description

Retrieves the current time from an AudioDevice. Note that the device has to be running.

Parameter inDevice: The AudioDevice to from which to get the time.

Parameter outTime: An AudioTimeStamp into which the current time is put. On entry, the mFlags field specifies which representations to provide. Because not every device supports all time representations, on exit, the mFlags field will indicate what values are actually valid.

Returns: An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be returned if the AudioDevice isn’t running.

§Safety

out_time must be a valid pointer.