AudioTrack.GetTimestamp(AudioTimestamp) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Poll for a timestamp on demand.
[Android.Runtime.Register("getTimestamp", "(Landroid/media/AudioTimestamp;)Z", "GetGetTimestamp_Landroid_media_AudioTimestamp_Handler")]
public virtual bool GetTimestamp (Android.Media.AudioTimestamp? timestamp);
[<Android.Runtime.Register("getTimestamp", "(Landroid/media/AudioTimestamp;)Z", "GetGetTimestamp_Landroid_media_AudioTimestamp_Handler")>]
abstract member GetTimestamp : Android.Media.AudioTimestamp -> bool
override this.GetTimestamp : Android.Media.AudioTimestamp -> bool
Parameters
- timestamp
- AudioTimestamp
a reference to a non-null AudioTimestamp instance allocated and owned by caller.
Returns
true if a timestamp is available, or false if no timestamp is available.
If a timestamp is available,
the AudioTimestamp instance is filled in with a position in frame units, together
with the estimated time when that frame was presented or is committed to
be presented.
In the case that no timestamp is available, any supplied instance is left unaltered.
A timestamp may be temporarily unavailable while the audio clock is stabilizing,
or during and immediately after a route change.
A timestamp is permanently unavailable for a given route if the route does not support
timestamps. In this case, the approximate frame position can be obtained
using #getPlaybackHeadPosition.
However, it may be useful to continue to query for
timestamps occasionally, to recover after a route change.
- Attributes
Remarks
Java documentation for android.media.AudioTrack.getTimestamp(android.media.AudioTimestamp).
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.