AudioDeviceTranslateTime

Function AudioDeviceTranslateTime 

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

Translates the time in the AudioDevice’s time base from one representation to another. Note that the device has to be running

Parameter inDevice: The AudioDevice whose time base governs the translation.

Parameter inTime: An AudioTimeStamp containing the time to be translated.

Parameter outTime: An AudioTimeStamp into which the translated time is put. On entry, the mFlags field specifies which representations to translate the input time into. Because not every device supports all time representations, on exit, the mFlags field will indicate which translations were actually done.

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

§Safety

  • in_time must be a valid pointer.
  • out_time must be a valid pointer.