Share via


AudioTrack.SetStartThresholdInFrames(Int32) Method

Definition

Sets the streaming start threshold for an AudioTrack.

[Android.Runtime.Register("setStartThresholdInFrames", "(I)I", "GetSetStartThresholdInFrames_IHandler", ApiSince=31)]
public virtual int SetStartThresholdInFrames (int startThresholdInFrames);
[<Android.Runtime.Register("setStartThresholdInFrames", "(I)I", "GetSetStartThresholdInFrames_IHandler", ApiSince=31)>]
abstract member SetStartThresholdInFrames : int -> int
override this.SetStartThresholdInFrames : int -> int

Parameters

startThresholdInFrames
Int32

the desired start threshold.

Returns

the actual start threshold in frames value. This is an integer between 1 to the buffer capacity (see #getBufferCapacityInFrames()), and might change if the output sink changes after track creation.

Attributes

Remarks

Sets the streaming start threshold for an AudioTrack.

The streaming start threshold is the buffer level that the written audio data must reach for audio streaming to start after #play() is called.

For compressed streams, the size of a frame is considered to be exactly one byte.

Java documentation for android.media.AudioTrack.setStartThresholdInFrames(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