Freigeben über


AudioRecord.GetTimestamp(AudioTimestamp, AudioTimebase) Method

Definition

Poll for an AudioTimestamp on demand.

[Android.Runtime.Register("getTimestamp", "(Landroid/media/AudioTimestamp;I)I", "GetGetTimestamp_Landroid_media_AudioTimestamp_IHandler", ApiSince=24)]
public virtual int GetTimestamp (Android.Media.AudioTimestamp outTimestamp, Android.Media.AudioTimebase timebase);
[<Android.Runtime.Register("getTimestamp", "(Landroid/media/AudioTimestamp;I)I", "GetGetTimestamp_Landroid_media_AudioTimestamp_IHandler", ApiSince=24)>]
abstract member GetTimestamp : Android.Media.AudioTimestamp * Android.Media.AudioTimebase -> int
override this.GetTimestamp : Android.Media.AudioTimestamp * Android.Media.AudioTimebase -> int

Parameters

outTimestamp
AudioTimestamp

a caller provided non-null AudioTimestamp instance, which is updated with the AudioRecord frame delivery information upon success.

timebase
AudioTimebase

one of AudioTimestamp#TIMEBASE_BOOTTIME AudioTimestamp.TIMEBASE_BOOTTIME or AudioTimestamp#TIMEBASE_MONOTONIC AudioTimestamp.TIMEBASE_MONOTONIC, used to select the clock for the AudioTimestamp time.

Returns

#SUCCESS if a timestamp is available, or #ERROR_INVALID_OPERATION if a timestamp not available.

Attributes

Remarks

Poll for an AudioTimestamp on demand.

The AudioTimestamp reflects the frame delivery information at the earliest point available in the capture pipeline.

Calling #startRecording() following a #stop() will reset the frame count to 0.

Java documentation for android.media.AudioRecord.getTimestamp(android.media.AudioTimestamp, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to