AudioTrack.SetPlaybackHeadPosition(Int32) AudioTrack.SetPlaybackHeadPosition(Int32) Method

Definition

Sets the playback head position within the static buffer.

[Android.Runtime.Register("setPlaybackHeadPosition", "(I)I", "GetSetPlaybackHeadPosition_IHandler")]
public virtual Android.Media.TrackStatus SetPlaybackHeadPosition (int positionInFrames);
abstract member SetPlaybackHeadPosition : int -> Android.Media.TrackStatus
override this.SetPlaybackHeadPosition : int -> Android.Media.TrackStatus

Parameters

positionInFrames
Int32 Int32

playback head position within buffer, expressed in frames. Zero corresponds to start of buffer. The position must not be greater than the buffer size in frames, or negative. Though this method and PlaybackHeadPosition have similar names, the position values have different meanings.
If looping is currently enabled and the new position is greater than or equal to the loop end marker, the behavior varies by API level: as of Build VERSION_CODES M, the looping is first disabled and then the position is set. For earlier API levels, the behavior is unspecified.

Returns

Remarks

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