pub unsafe extern "C" fn oboe_AudioStream_getTimestamp(
    this: *mut c_void,
    arg1: clockid_t
) -> oboe_ResultWithValue<oboe_FrameTimestamp>
Expand description

Get the estimated time that the frame at framePosition entered or left the audio processing pipeline.

This can be used to coordinate events and interactions with the external environment, and to estimate the latency of an audio stream. An example of usage can be found in the hello-oboe sample (search for “calculateCurrentOutputLatencyMillis”).

The time is based on the implementation’s best effort, using whatever knowledge is available to the system, but cannot account for any delay unknown to the implementation.

Note that due to issues in Android before R, we recommend NOT calling this method from a data callback. See this tech note for more details. https://github.com/google/oboe/wiki/TechNote_ReleaseBuffer

See @param clockId the type of clock to use e.g. CLOCK_MONOTONIC @return a FrameTimestamp containing the position and time at which a particular audio frame entered or left the audio processing pipeline, or an error if the operation failed.